c++/jvm-jni-starter/nbproject/Package-Debug.bash
author František Kučera <franta-hg@frantovo.cz>
Fri, 08 May 2020 00:02:05 +0200
changeset 57 1b21c78d8706
parent 55 2fbf53cf0782
permissions -rw-r--r--
SQLite: demo modul – rozšíření přidávající pár funkcí do SQL
Vzniklo v rámci práce na článku: https://blog.frantovo.cz/c/383/Komplexita%3A%20%C5%99e%C5%A1en%C3%AD%20a%C2%A0prevence
     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}/jvm-jni-starter
    17 OUTPUT_BASENAME=jvm-jni-starter
    18 PACKAGE_TOP_DIR=jvm-jni-starter/
    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}/jvm-jni-starter/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/jvm-jni-starter.tar
    70 cd ${NBTMPDIR}
    71 tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/jvm-jni-starter.tar *
    72 checkReturnCode
    73 
    74 # Cleanup
    75 cd "${TOP}"
    76 rm -rf ${NBTMPDIR}