shorewall_code/tools/build/upload

91 lines
2.6 KiB
Plaintext
Raw Normal View History

#/bin/sh
rpm=
literpm=
perlrpm=
shellrpm=
DEST=
USER="webmin@mail.shorewall.net"
SHOREWALL=shorewall
COMMAND=scp
case $1 in
4.*Beta*|4.*RC*)
DEST="/srv/ftp/pub/shorewall/development/${1%.*}/shorewall-$1"
SHOREWALL=shorewall-common
rpm=shorewall-common-${1%-*}-0${1#*-}.noarch.rpm
literpm=shorewall-lite-${1%-*}-0${1#*-}.noarch.rpm
perlrpm=shorewall-perl-${1%-*}-0${1#*-}.noarch.rpm
shellrpm=shorewall-shell-${1%-*}-0${1#*-}.noarch.rpm
;;
4.0.*)
DEST="/srv/ftp/pub/shorewall/development/${1%.*}/shorewall-$1"
SHOREWALL=shorewall-common
rpm=shorewall-common-${1}-1.noarch.rpm
literpm=shorewall-lite-${1}-1.noarch.rpm
perlrpm=shorewall-perl-${1}-1.noarch.rpm
shellrpm=shorewall-shell-${1}-1.noarch.rpm
;;
3.9.*)
DEST="/srv/ftp/pub/shorewall/development/${1%.*}/shorewall-$1"
rpm=shorewall-${1}-1.noarch.rpm
literpm=shorewall-lite-${1}-1.noarch.rpm
perlrpm=shorewall-perl-${1}-1.noarch.rpm
shellrpm=shorewall-shell-${1}-1.noarch.rpm
;;
3.*[13579].*)
DEST="/srv/ftp/pub/shorewall/development/${1%.*}/shorewall-$1"
rpm=shorewall-${1}-1.noarch.rpm
literpm=shorewall-lite-${1}-1.noarch.rpm
;;
*.*[13579].*)
DEST="/srv/ftp/pub/shorewall/development/${1%.*}/shorewall-$1"
rpm=shorewall-${1}-1.noarch.rpm
;;
3.*Beta*|*RC*)
DEST="/srv/ftp/pub/shorewall/development/${1%.*}/shorewall-$1"
rpm=shorewall-${1%-*}-0${1#*-}.noarch.rpm
literpm=shorewall-lite-${1%-*}-0${1#*-}.noarch.rpm
;;
*.*Beta*|*RC*)
DEST="/srv/ftp/pub/shorewall/development/${1%.*}/shorewall-$1"
rpm=shorewall-${1%-*}-0${1#*-}.noarch.rpm
literpm=shorewall-lite-${1%-*}-0${1#*-}.noarch.rpm
perlrpm=shorewall-perl-${1%-*}-0${1#*-}.noarch.rpm
shellrpm=shorewall-shell-${1%-*}-0${1#*-}.noarch.rpm
;;
3.[2468].*)
DEST="/srv/ftp/pub/shorewall/${1%.*}/shorewall-$1"
rpm=shorewall-${1}-1.noarch.rpm
literpm=shorewall-lite-${1}-1.noarch.rpm
;;
*.[2468].*)
DEST="/srv/ftp/pub/shorewall/${1%.*}/shorewall-$1"
rpm=shorewall-${1}-1.noarch.rpm
literpm=shorewall-lite-${1}-1.noarch.rpm
perlrpm=shorewall-perl-${1}-1.noarch.rpm
shellrpm=shorewall-shell-${1}-1.noarch.rpm
;;
*)
DEST="/srv/ftp/pub/shorewall/${1%.*}/shorewall-$1"
rpm=shorewall-${1}-1.noarch.rpm
;;
esac
[ $# -eq 1 ] || { echo "Usage: $(basename $0) <version>"; exit 2; }
[ -d errata ] || mkdir errata
echo "There are no known problems in Shorewall version $1" > known_problems.txt
if [ "$HOSTNAME" = lists ]; then
mkdir -p $DEST
COMMAND=cp
else
ssh $USER mkdir -p $DEST
$DEST=${USER}:${DEST}
fi
$COMMAND -r errata known_problems.txt patch-$1 ${1}.* releasenotes.txt shorewall*${1}*.tgz* shorewall*${1}*.bz2* $rpm $literpm $perlrpm $shellrpm $DEST