deflate: Cleanup
[deark.git] / scripts / makerelease.sh
blob50f30d3f02de11daeb98c996eb92a8fa80b168cb
1 #!/bin/bash
3 VER=1.5.7
5 if [ ! -f formats.txt ]
6 then
7 echo "Run this script from the main directory"
8 exit 1
9 fi
11 if [ -f src/deark-config2.h ]
12 then
13 echo "Remove src/deark-config2.h first"
14 exit 1
17 rm -rf .build-tmp
18 mkdir .build-tmp
20 D=".build-tmp/deark-$VER"
22 #echo "Using temporary directory .build-tmp/deark-$VER"
24 mkdir $D
26 mkdir $D/src
27 cp -p src/*.c src/*.h src/*.rc src/*.manifest $D/src/
29 mkdir $D/modules
30 cp -p modules/*.c $D/modules/
32 mkdir $D/foreign
33 cp -p foreign/* $D/foreign/
35 mkdir $D/scripts
36 cp -p scripts/*.sh scripts/*.pl $D/scripts/
38 mkdir $D/proj
39 mkdir $D/proj/vs2019
40 cp -p proj/vs2019/*.sln proj/vs2019/*.vcxproj proj/vs2019/*.vcxproj.filters $D/proj/vs2019/
42 mkdir $D/obj
43 mkdir $D/obj/src
44 cp -p obj/src/.gitignore $D/obj/src/
45 mkdir $D/obj/modules
46 cp -p obj/modules/.gitignore $D/obj/modules/
48 cp -p readme.md technical.md formats.txt COPYING Makefile deps.mk .editorconfig $D/
50 mkdir $D/x64
51 cp -p Release64/deark.exe $D/x64/
53 echo "Writing deark-${VER}.tar.gz"
54 tar --directory .build-tmp -c --owner=root:0 --group=root:0 -O deark-$VER | gzip -9 > deark-${VER}.tar.gz
56 rm -rf .build-tmp