-
Notifications
You must be signed in to change notification settings - Fork 17
/
buildapi.sh
executable file
·57 lines (45 loc) · 1.24 KB
/
buildapi.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# run buildapi.sh from the IA2 directory
# make sure we have Cygwin
if [ ! -d /cygdrive/c ]; then
echo 'Expected to find Cygwin'
exit 1
fi
# make sure we have the proper directory structure
if [ ! -d api ]; then
echo 'Expected to find ./api'
exit 1
fi
# make sure we have Doxygen
if [ ! -x /cygdrive/c/program\ files/doxygen/bin/doxygen.exe ]; then
echo 'Expected to find c:/program files/doxygen/bin/doxygen.exe'
exit 1
fi
# make sure we have a Doxygen configuration file
if [ ! -f doxygen.conf ]; then
echo 'Expected to find doxygen.conf'
exit 1
fi
# clean up test dir
if [ -f IDL-Test/dlldata.c ]; then
rm IDL-Test/*.c
rm IDL-Test/*.h
fi
cp IDL-Test/StdAfxSave/*.* IDL-Test
# remove previous autogenerated Doxygen files
if [ -d docs ]; then
rm -rf docs
fi
# generate IDL documentation with Doxygen
cd api
/cygdrive/c/program\ files/doxygen/bin/doxygen ../doxygen.conf
cd ..
./concatidl.sh
# remove previous autogenerated zip file
if [ -f ia2-api-`date +%Y%m%d`.zip ]; then
rm ia2-api-`date +%Y%m%d`.zip
fi
# package merged IDL file and documentation
zip -9r ia2-api-`date +%Y%m%d`.zip ia2_api_all.idl api/*.idl docs
# list packaged file for visual confirmation
echo ''
ls -l ia2-api-`date +%Y%m%d`.zip