forked from felixplasser/theodore-qc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake_distrib.bash
More file actions
executable file
·60 lines (44 loc) · 1.33 KB
/
Copy pathmake_distrib.bash
File metadata and controls
executable file
·60 lines (44 loc) · 1.33 KB
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
58
59
60
#!/bin/bash
# Create a new distribution version
# TODO before:
# - Check version number in theo_header.py and doc/source/conf.py
# - doc/README up to date?
# - git tag set by this script
echo "Syntax: make_distrib.bash [Version]"
echo
if [ $# -eq 0 ]
then
echo "Please enter version number!"
exit 1
fi
SDIR=`pwd`
LTDIR="TheoDORE_$1"
TDIR="$SDIR/../Versions/$LTDIR"
echo "Creating new version in $TDIR"
mkdir $TDIR || exit 2
git tag -a v$1
cp README.rst COPYRIGHT.txt LICENSE.txt $TDIR
sed "s/GIT/$LTDIR/" setpaths.bash > $TDIR/setpaths.bash
sed "s/GIT/$LTDIR/" setpaths.csh > $TDIR/setpaths.csh
cp -r bin $TDIR
mkdir $TDIR/EXAMPLES
cp -r ../EXAMPLES/STANDARD $TDIR/EXAMPLES
cp -r ../EXAMPLES/CCLIB $TDIR/EXAMPLES
cp -r ../EXAMPLES/UTILS $TDIR/EXAMPLES
cp -r ../EXAMPLES/EXTRA $TDIR/EXAMPLES
rm -r $TDIR/EXAMPLES/*/*/RUN
cp -r theodore $TDIR
# cclib as used by TheoDORE
cp -r external/cclib/cclib $TDIR
cp external/cclib/LICENSE $TDIR/cclib
# periodictable
cp -r external/periodictable/periodictable $TDIR
cp external/periodictable/LICENSE.txt $TDIR/periodictable
# colt as used by TheoDORE
cp -r external/colt/colt $TDIR
cp external/colt/LICENSE $TDIR/colt
echo "Removing binary pyc files"
find $TDIR -name '*pyc' -exec rm {} \;
# create tar with shorter relative paths
cd $SDIR/../Versions
tar -czf $LTDIR.tar.gz $LTDIR