nbproject/Package-Default.bash

changeset 36
a7ff583e153f
parent 35
35120de6ee53
child 37
cf65b0ddd030
equal deleted inserted replaced
35:35120de6ee53 36:a7ff583e153f
1 #!/bin/bash -x
2
3 #
4 # Generated - do not edit!
5 #
6
7 # Macros
8 TOP=`pwd`
9 CND_PLATFORM=GNU-Linux-x86
10 CND_CONF=Default
11 CND_DISTDIR=dist
12 CND_BUILDDIR=build
13 NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
14 TMPDIRNAME=tmp-packaging
15 OUTPUT_PATH=MissingOutputInProject
16 OUTPUT_BASENAME=MissingOutputInProject
17 PACKAGE_TOP_DIR=cline/
18
19 # Functions
20 function checkReturnCode
21 {
22 rc=$?
23 if [ $rc != 0 ]
24 then
25 exit $rc
26 fi
27 }
28 function makeDirectory
29 # $1 directory path
30 # $2 permission (optional)
31 {
32 mkdir -p "$1"
33 checkReturnCode
34 if [ "$2" != "" ]
35 then
36 chmod $2 "$1"
37 checkReturnCode
38 fi
39 }
40 function copyFileToTmpDir
41 # $1 from-file path
42 # $2 to-file path
43 # $3 permission
44 {
45 cp "$1" "$2"
46 checkReturnCode
47 if [ "$3" != "" ]
48 then
49 chmod $3 "$2"
50 checkReturnCode
51 fi
52 }
53
54 # Setup
55 cd "${TOP}"
56 mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
57 rm -rf ${NBTMPDIR}
58 mkdir -p ${NBTMPDIR}
59
60 # Copy files and create directories and links
61 cd "${TOP}"
62 makeDirectory "${NBTMPDIR}/cline"
63 copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
64
65
66 # Generate tar file
67 cd "${TOP}"
68 rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cline.tar
69 cd ${NBTMPDIR}
70 tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/cline.tar *
71 checkReturnCode
72
73 # Cleanup
74 cd "${TOP}"
75 rm -rf ${NBTMPDIR}

mercurial