-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdo-upload
executable file
·67 lines (57 loc) · 1.39 KB
/
do-upload
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
61
62
63
64
65
66
67
#!/bin/sh
CFG_FILE=~/.libtabula
if [ ! -f $CFG_FILE ]
then
echo Create $CFG_FILE, please.
echo
exit 1
fi
. $CFG_FILE
if [ ! -f config.h ]
then
echo Package hasn't yet been built, or you aren't in the top
echo libtabula directory.
echo
exit 1
fi
VERSION=`grep ^Version: libtabula.spec | awk '{ print $2 }'`
case "$VERSION" in
*alpha*) SSH_TARGET=$SSH_TARGET/test ;;
*beta*) SSH_TARGET=$SSH_TARGET/test ;;
*rc[0-9]*) SSH_TARGET=$SSH_TARGET/test ;;
*) SSH_TARGET=$SSH_TARGET/releases ;;
esac
TMPDIR=`mktemp -d /tmp/libtabula-up.XXXXXXXXXX`
for action in $*
do
case $action in
src)
if [ ! -e libtabula-$VERSION.tar.gz ]
then
make dist
fi
cp libtabula-$VERSION.tar.gz $TMPDIR
if [ ! -e /usr/src/redhat/SRPMS/libtabula-$VERSION-1.src.rpm ]
then
make srpm
fi
cp /usr/src/redhat/SRPMS/libtabula-$VERSION-1.src.rpm $TMPDIR
;;
man)
if [ ! -e /usr/src/redhat/RPMS/i386/libtabula-manuals-$VERSION-1.i386.rpm ]
then
make rpm
fi
cp /usr/src/redhat/RPMS/i386/libtabula-manuals-$VERSION-1.i386.rpm $TMPDIR
;;
*)
echo "Unknown action '$action'."
;;
esac
done
cp /usr/src/redhat/RPMS/i386/libtabula-$VERSION-1.i386.rpm \
$TMPDIR/libtabula-$VERSION-1.`./osver`.i386.rpm
cp /usr/src/redhat/RPMS/i386/libtabula-devel-$VERSION-1.i386.rpm \
$TMPDIR/libtabula-devel-$VERSION-1.`./osver`.i386.rpm
scp $SSH_OPTIONS $TMPDIR/* $SSH_TARGET
rm -rf $TMPDIR