c++/domain-socket-bridge/nbproject/Package-Debug.bash
author František Kučera <franta-hg@frantovo.cz>
Sun, 11 Jun 2017 13:07:53 +0200
changeset 51 514b9b433dc2
parent 28 1fec66105b8e
permissions -rw-r--r--
lpt-signal-generator: comments
     1 #!/bin/bash -x
     2 
     3 #
     4 # Generated - do not edit!
     5 #
     6 
     7 # Macros
     8 TOP=`pwd`
     9 CND_PLATFORM=GNU-Linux
    10 CND_CONF=Debug
    11 CND_DISTDIR=dist
    12 CND_BUILDDIR=build
    13 CND_DLIB_EXT=so
    14 NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
    15 TMPDIRNAME=tmp-packaging
    16 OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/domain-socket-bridge
    17 OUTPUT_BASENAME=domain-socket-bridge
    18 PACKAGE_TOP_DIR=domain-socket-bridge/
    19 
    20 # Functions
    21 function checkReturnCode
    22 {
    23     rc=$?
    24     if [ $rc != 0 ]
    25     then
    26         exit $rc
    27     fi
    28 }
    29 function makeDirectory
    30 # $1 directory path
    31 # $2 permission (optional)
    32 {
    33     mkdir -p "$1"
    34     checkReturnCode
    35     if [ "$2" != "" ]
    36     then
    37       chmod $2 "$1"
    38       checkReturnCode
    39     fi
    40 }
    41 function copyFileToTmpDir
    42 # $1 from-file path
    43 # $2 to-file path
    44 # $3 permission
    45 {
    46     cp "$1" "$2"
    47     checkReturnCode
    48     if [ "$3" != "" ]
    49     then
    50         chmod $3 "$2"
    51         checkReturnCode
    52     fi
    53 }
    54 
    55 # Setup
    56 cd "${TOP}"
    57 mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
    58 rm -rf ${NBTMPDIR}
    59 mkdir -p ${NBTMPDIR}
    60 
    61 # Copy files and create directories and links
    62 cd "${TOP}"
    63 makeDirectory "${NBTMPDIR}/domain-socket-bridge/bin"
    64 copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
    65 
    66 
    67 # Generate tar file
    68 cd "${TOP}"
    69 rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/domain-socket-bridge.tar
    70 cd ${NBTMPDIR}
    71 tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/domain-socket-bridge.tar *
    72 checkReturnCode
    73 
    74 # Cleanup
    75 cd "${TOP}"
    76 rm -rf ${NBTMPDIR}