OSDN Git Service

4b200b8160e1b2340bcdc5a0abe33a8a5a6e1c77
[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 PLATFORM=MinGW-Windows
10 TMPDIR=build/Debug/${PLATFORM}/tmp-packaging
11 TMPDIRNAME=tmp-packaging
12 OUTPUT_PATH=dist/Debug/${PLATFORM}/nicovideodbg.dll
13 OUTPUT_BASENAME=nicovideodbg.dll
14 PACKAGE_TOP_DIR=libvhook.dll/
15
16 # Functions
17 function checkReturnCode
18 {
19     rc=$?
20     if [ $rc != 0 ]
21     then
22         exit $rc
23     fi
24 }
25 function makeDirectory
26 # $1 directory path
27 # $2 permission (optional)
28 {
29     mkdir -p "$1"
30     checkReturnCode
31     if [ "$2" != "" ]
32     then
33       chmod $2 "$1"
34       checkReturnCode
35     fi
36 }
37 function copyFileToTmpDir
38 # $1 from-file path
39 # $2 to-file path
40 # $3 permission
41 {
42     cp "$1" "$2"
43     checkReturnCode
44     if [ "$3" != "" ]
45     then
46         chmod $3 "$2"
47         checkReturnCode
48     fi
49 }
50
51 # Setup
52 cd "${TOP}"
53 mkdir -p dist/Debug/${PLATFORM}/package
54 rm -rf ${TMPDIR}
55 mkdir -p ${TMPDIR}
56
57 # Copy files and create directories and links
58 cd "${TOP}"
59 makeDirectory ${TMPDIR}/libvhook.dll/lib
60 copyFileToTmpDir "${OUTPUT_PATH}" "${TMPDIR}/${PACKAGE_TOP_DIR}lib/${OUTPUT_BASENAME}" 0644
61
62
63 # Generate tar file
64 cd "${TOP}"
65 rm -f dist/Debug/${PLATFORM}/package/libvhook.dll.tar
66 cd ${TMPDIR}
67 tar -vcf ../../../../dist/Debug/${PLATFORM}/package/libvhook.dll.tar *
68 checkReturnCode
69
70 # Cleanup
71 cd "${TOP}"
72 rm -rf ${TMPDIR}