-
Notifications
You must be signed in to change notification settings - Fork 44
/
make-release.sh
executable file
·35 lines (30 loc) · 1.03 KB
/
make-release.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
#!/bin/bash
if [ "$1" == "" ]; then
echo "No version given."
exit 1
fi
releasepath=thtk-bin-$1
echo Generating $releasepath
rm -rf $releasepath
mkdir $releasepath
rm -rf $releasepath-pdbs
mkdir $releasepath-pdbs
for i in thanm thanm.old thecl thdat thmsg thstd; do
echo $i
echo .ds doc-default-operating-system thtk | groff -mdoc -Tutf8 -P -bu - $i/$i.1 | perl -pe 's/\e\[?.*?[\@-~]//g' | unix2dos > $releasepath/README.$i.txt
cp build/$i/RelWithDebInfo/$i.exe $releasepath/
cp build/$i/RelWithDebInfo/$i.pdb $releasepath-pdbs/
done
cp build/thtk/RelWithDebInfo/thtk.dll $releasepath/
cp build/thtk/RelWithDebInfo/thtk.lib $releasepath/
cp build/thtk/RelWithDebInfo/thtk.pdb $releasepath-pdbs/
cp "$(cygpath "$VCToolsRedistDir")/${THTK_ARCH:-x86}/Microsoft.VC143.OPENMP/vcomp140.dll" $releasepath/
copy_doc() {
while [ "$1" != "" ]; do
cat $1 | unix2dos > $releasepath/$1.txt
shift
done
}
copy_doc COPYING.{libpng,zlib} COPYING README NEWS
zip -r -9 $releasepath.zip $releasepath
zip -r -9 $releasepath-pdbs.zip $releasepath-pdbs