-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsourcetar
executable file
·53 lines (40 loc) · 1.29 KB
/
sourcetar
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
#!/bin/bash
PROJECT=bobcat
cd ~/git/bobcat/src
if [ -e /usr/share/common-licenses/GPL ] ; then
cp /usr/share/common-licenses/GPL ${PROJECT}/LICENSE
echo "
Specific permission is granted for the GPLed code in this distribution to
be linked to OpenSSL without invoking GPL clause 2(b)." >> ${PROJECT}/LICENSE
fi
. ${PROJECT}/VERSION # load the version
DISTRIBUTION=${PROJECT}-${VERSION} # define the distribution's dir name
tgz()
{
ln -s ${PROJECT} ${DISTRIBUTION} # distribution's dir name
tar czvf $1 --exclude-from=excluded ${DISTRIBUTION}/*
rm ${DISTRIBUTION} ${PROJECT}/LICENSE # rm the link/LICENSE file
}
case "$1" in
(d)
tgz ${HOME}/git/${PROJECT}/tarballs/${PROJECT}_${VERSION}.orig.tar.gz
;;
(l|o)
tgz ${PROJECT}_${VERSION}.tar.gz
if [ "$1" == "o" ]
then
scp ${PROJECT}_${VERSION}.tar.gz \
oosix:git/${PROJECT}/tarballs/${PROJECT}_${VERSION}.orig.tar.gz
rm ${PROJECT}_${VERSION}.tar.gz
fi
;;
(*)
echo "
Provide arg:
d (debian) to create a local .orig.tar.gz archive in ../tarballs
l (local) to create ${PROJECT}_${VERSION}.tar.gz in this directory
o (oosix) same as 'l', but upload to oosix (IUO)
"
exit 1
;;
esac