OSDN Git Service

リファクタリング
[coroid/inqubus.git] / vhook / nbproject / Package-Debug.bash
1 #!/bin/bash -x
2
3 #
4 # Generated - do not edit!
5 #
6
7 # Macros
8 TOP=`pwd`
9 CND_PLATFORM=MinGW_sjlj-Windows
10 CND_CONF=Debug
11 CND_DISTDIR=dist
12 TMPDIR=build/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
13 TMPDIRNAME=tmp-packaging
14 OUTPUT_PATH=dist/Debug/${CND_PLATFORM}/nicovideodbg.dll
15 OUTPUT_BASENAME=nicovideodbg.dll
16 PACKAGE_TOP_DIR=libsaccubusvhook.dll/
17
18 # Functions
19 function checkReturnCode
20 {
21     rc=$?
22     if [ $rc != 0 ]
23     then
24         exit $rc
25     fi
26 }
27 function makeDirectory
28 # $1 directory path
29 # $2 permission (optional)
30 {
31     mkdir -p "$1"
32     checkReturnCode
33     if [ "$2" != "" ]
34     then
35       chmod $2 "$1"
36       checkReturnCode
37     fi
38 }
39 function copyFileToTmpDir
40 # $1 from-file path
41 # $2 to-file path
42 # $3 permission
43 {
44     cp "$1" "$2"
45     checkReturnCode
46     if [ "$3" != "" ]
47     then
48         chmod $3 "$2"
49         checkReturnCode
50     fi
51 }
52
53 # Setup
54 cd "${TOP}"
55 mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
56 rm -rf ${TMPDIR}
57 mkdir -p ${TMPDIR}
58
59 # Copy files and create directories and links
60 cd "${TOP}"
61 makeDirectory ${TMPDIR}/libsaccubusvhook.dll/lib
62 copyFileToTmpDir "${OUTPUT_PATH}" "${TMPDIR}/${PACKAGE_TOP_DIR}lib/${OUTPUT_BASENAME}" 0644
63
64
65 # Generate tar file
66 cd "${TOP}"
67 rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/libsaccubusvhook.dll.tar
68 cd ${TMPDIR}
69 tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/libsaccubusvhook.dll.tar *
70 checkReturnCode
71
72 # Cleanup
73 cd "${TOP}"
74 rm -rf ${TMPDIR}