File tree 1 file changed +48
-0
lines changed
1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ VERSION=` cat CMakeLists.txt| grep VERSION | grep set | head -n 1 | cut -f 2 -d " " | cut -f 1 -d " )" `
4
+ LIBNAME=jthread
5
+ TMPDIR=` tempfile`
6
+ CURDIR=` pwd`
7
+ rm -r $TMPDIR
8
+ if ! mkdir $TMPDIR ; then
9
+ echo " Couldn't create temporary directory"
10
+ exit -1
11
+ fi
12
+
13
+ cd $TMPDIR
14
+ TMPDIR=` pwd` # Get the full path
15
+ cd $CURDIR
16
+
17
+ if ! git archive --format tar --prefix=${LIBNAME} -${VERSION} / HEAD | (cd $TMPDIR && tar xf -) ; then
18
+ echo " Couldn't archive repository"
19
+ exit -1
20
+ fi
21
+
22
+ cd $TMPDIR /${LIBNAME} -${VERSION}
23
+
24
+ rm -f ` find . -name " .git*" `
25
+ rm -f builddist.sh
26
+ rm -rf sphinxdoc
27
+ rm -f TODO
28
+
29
+ cd ..
30
+
31
+ if ! tar cfz ${LIBNAME} -${VERSION} .tar.gz ${LIBNAME} -${VERSION} / ; then
32
+ echo " Couldn't create archive"
33
+ exit -1
34
+ fi
35
+
36
+ if ! tar cfj ${LIBNAME} -${VERSION} .tar.bz2 ${LIBNAME} -${VERSION} / ; then
37
+ echo " Couldn't create archive"
38
+ exit -1
39
+ fi
40
+
41
+ if ! zip ${LIBNAME} -${VERSION} .zip ` find ${LIBNAME} -${VERSION} /` ; then
42
+ echo " Couldn't create archive"
43
+ exit -1
44
+ fi
45
+
46
+ mv $TMPDIR $CURDIR /
47
+
48
+
You can’t perform that action at this time.
0 commit comments