Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit 7ceb0f8

Browse files
author
Jelte Jansen
committed
Add script to create tarball specifically for packaging
This removes a number of files that are provided by the OS
1 parent 5aff1e3 commit 7ceb0f8

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

scripts/dctb.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/sh
2+
PACKAGE=spin
3+
VERSION=`cat VERSION`
4+
5+
OUTDIR="/tmp/spin_release_file/"
6+
# remove it if it exists, hardcoded for protecting a bit against, say OUTDIR="/"
7+
if [ -d "/tmp/spin_release_file/" ]; then
8+
rm -rf /tmp/spin_release_file/
9+
fi
10+
11+
BNAME="${PACKAGE}-${VERSION}"
12+
13+
CHECK=1
14+
OPTION=$1
15+
if [ "$OPTION" = "-n" ]; then
16+
CHECK=0
17+
fi
18+
19+
echo "cp -r * ${OUTDIR}${BNAME}/"
20+
21+
mkdir -p ${OUTDIR}${BNAME} &&\
22+
cp -r . ${OUTDIR}${BNAME}/ &&\
23+
(cd ${OUTDIR}${BNAME}; git clean -fxd) &&\
24+
(cd ${OUTDIR}${BNAME}/src; autoreconf --install && ./configure && rm -rf lua/tests && rm -rf tests) &&\
25+
if [ $CHECK -eq 1 ]; then
26+
(cd ${OUTDIR}${BNAME}/src; make && make distclean)
27+
fi &&\
28+
(cd ${OUTDIR}${BNAME} && rm -rf .git .gitignore && rm -rf build) &&\
29+
(cd ${OUTDIR}${BNAME}/src && rm -f spinweb/static/spin_graph/js/jquery-3.1.1.min.js.gz) &&\
30+
(cd ${OUTDIR}${BNAME}/src && rm -rf spinweb/static/spin_graph/js/jquery-ui-1.12.1.custom) &&\
31+
(cd ${OUTDIR}${BNAME}/src && rm -f lib/version.c) &&\
32+
(cd ${OUTDIR}; tar -czvf ${BNAME}.tar.gz ${BNAME}) &&\
33+
echo "Created ${OUTDIR}${BNAME}.tar.gz" &&\
34+
rm -rf ${OUTDIR}${BNAME} &&\
35+
sha256sum ${OUTDIR}${BNAME}.tar.gz

0 commit comments

Comments
 (0)