add pid to log
[nip.io] / dist.sh
1 #!/bin/bash
2
3
4 abspath=$(which abspath)
5 if [ "$abspath" = "" ]; then
6     abspath="readlink -f"
7 fi
8
9 me=$($abspath $0)
10 parent=$(dirname $me)
11 distname=$(basename $parent)
12
13 build=$parent/build
14
15 . $parent/dist.version
16
17 [ -d "$build" ] && echo "Removing $build" && rm -rf "$build"
18
19 scripts=$build/$distname/$version
20 mkdir -p "$scripts"
21
22 cp $parent/src/* $scripts/
23 chmod +x $scripts/*.py
24
25 cd $build
26 tar zcf $distname-$version.tar.gz $distname