File: mvrel

package info (click to toggle)
openswan 1%3A2.4.6%2Bdfsg.2-1.1%2Betch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 25,000 kB
  • ctags: 16,877
  • sloc: ansic: 121,112; sh: 19,782; xml: 9,699; asm: 4,422; perl: 4,087; makefile: 3,367; tcl: 713; exp: 657; yacc: 396; pascal: 328; lex: 289; sed: 265; awk: 124; lisp: 3
file content (65 lines) | stat: -rwxr-xr-x 1,221 bytes parent folder | download | duplicates (8)
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
#! /bin/sh
# mvrel major minor
# move packaged release to distribution site (password supplied manually)

PATH=/bin:/usr/bin
export PATH
umask 022

. $HOME/freeswan-regress-env.sh

localplace=~build/archive
site=freeswan@xs4.xs4all.nl
place=FTP
linkname=LATEST.tar
ssh=/usr/bin/ssh
scp=/usr/bin/scp

localonly=
remove=yes
for dummy
do
	case "$1" in
	-l)	localonly=yes	;;
	-c)	site=adams.freeswan.org ; place=/home/team ; scp=scp2 ; ssh=ssh2	;;
	-k)	remove=		;;
	--)	shift ; break	;;
	-*)	echo "$0: unknown option \'$1'" >&2 ; exit 2	;;
	*)	break		;;
	esac
	shift
done

case "$#:$1" in
1:*.*)	;;
*)	echo "Usage: $0 [-l] [-c] release" >&2 ; exit	;;
esac

tarname=freeswan-$1.tar

cd ~build/tmp
if test ! -r $tarname.gz
then
	echo "$0: no $tarname.gz!" >&2
	exit 1
fi

rm -f $localplace/$tarname.*
cp -p $tarname.gz $tarname.gz.sig $localplace

if test "$localonly"
then
	exit 0		# leaving the original around
fi

$ssh $site "cd $place ; rm -f $tarname.gz.sig $tarname.gz LATEST.* ;
			rm -f CANDIDATE.* freeswan-cand* ;
			mv freeswan-[0-9]* old ;
			ln -s $tarname.gz LATEST.tar.gz ;
			ln -s $tarname.gz.sig LATEST.tar.gz.sig"
$scp -p $tarname.gz.sig $tarname.gz $site:$place

if test "$remove"
then
	rm -f $tarname.*
fi