forked from extern/shorewall_code
Update upload for selective packages
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@7751 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
13b51c7309
commit
bca7715d00
@ -1,5 +1,8 @@
|
|||||||
#/bin/sh
|
#/bin/sh
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "Usage: upload [-pclsxh] <version>"
|
||||||
|
|
||||||
rpm=
|
rpm=
|
||||||
literpm=
|
literpm=
|
||||||
perlrpm=
|
perlrpm=
|
||||||
@ -10,6 +13,79 @@ USER="webadmin@mail.shorewall.net"
|
|||||||
SHOREWALL=shorewall
|
SHOREWALL=shorewall
|
||||||
COMMAND=scp
|
COMMAND=scp
|
||||||
|
|
||||||
|
UPLOADCOMMON=
|
||||||
|
UPLOADPERL=
|
||||||
|
UPLOADSHELL=
|
||||||
|
UPLOADLITE=
|
||||||
|
UPLOADXML=
|
||||||
|
UPLOADHTML=
|
||||||
|
|
||||||
|
done=
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
-*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
UPLOADCOMMON=Yes
|
||||||
|
UPLOADPERL=Yes
|
||||||
|
UPLOADSHELL=Yes
|
||||||
|
UPLOADLITE=Yes
|
||||||
|
UPLOADXML=Yes
|
||||||
|
UPLOADHTML=Yes
|
||||||
|
done=Yes
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
while [ -z "$done" ]; do
|
||||||
|
[ $# -eq 0 ] && break
|
||||||
|
|
||||||
|
option=$1
|
||||||
|
case $option in
|
||||||
|
-*)
|
||||||
|
option=${option#-}
|
||||||
|
|
||||||
|
[ -z "$option" ] && break
|
||||||
|
|
||||||
|
while [ -n "$option" ]; do
|
||||||
|
case $option in
|
||||||
|
p*)
|
||||||
|
UPLOADPERL=Yes
|
||||||
|
option=${option#p}
|
||||||
|
;;
|
||||||
|
c*)
|
||||||
|
UPLOADCOMMON=Yes
|
||||||
|
option=${option#c}
|
||||||
|
;;
|
||||||
|
s*)
|
||||||
|
UPLOADSHELL=Yes
|
||||||
|
option=${option#s}
|
||||||
|
;;
|
||||||
|
l*)
|
||||||
|
UPLOADLITE=Yes
|
||||||
|
option=${option#l}
|
||||||
|
;;
|
||||||
|
x*)
|
||||||
|
UPLOADXML=Yes
|
||||||
|
option=${option#x}
|
||||||
|
;;
|
||||||
|
h*)
|
||||||
|
UPLOADHTML=Yes
|
||||||
|
option=${option#h}
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
done=Yes
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
4.*Beta*|4.*RC*)
|
4.*Beta*|4.*RC*)
|
||||||
DEST="/srv/ftp/pub/shorewall/development/${1%.*}/shorewall-$1"
|
DEST="/srv/ftp/pub/shorewall/development/${1%.*}/shorewall-$1"
|
||||||
@ -19,6 +95,10 @@ case $1 in
|
|||||||
perlrpm=shorewall-perl-${1%-*}-0${1#*-}.noarch.rpm
|
perlrpm=shorewall-perl-${1%-*}-0${1#*-}.noarch.rpm
|
||||||
shellrpm=shorewall-shell-${1%-*}-0${1#*-}.noarch.rpm
|
shellrpm=shorewall-shell-${1%-*}-0${1#*-}.noarch.rpm
|
||||||
;;
|
;;
|
||||||
|
4.0.*-*)
|
||||||
|
DEST="/srv/ftp/pub/shorewall/${1%.*}/shorewall-${1%-*}"
|
||||||
|
SHOREWALL=shorewall-common
|
||||||
|
;;
|
||||||
4.0.*)
|
4.0.*)
|
||||||
DEST="/srv/ftp/pub/shorewall/${1%.*}/shorewall-$1"
|
DEST="/srv/ftp/pub/shorewall/${1%.*}/shorewall-$1"
|
||||||
SHOREWALL=shorewall-common
|
SHOREWALL=shorewall-common
|
||||||
@ -78,7 +158,7 @@ esac
|
|||||||
|
|
||||||
[ -d errata ] || mkdir errata
|
[ -d errata ] || mkdir errata
|
||||||
|
|
||||||
echo "There are no known problems in Shorewall version $1" > known_problems.txt
|
[ -f known_problems.txt ] || echo "There are no known problems in Shorewall version $1" > known_problems.txt
|
||||||
|
|
||||||
if [ -f shorewall-lite-${1}/releasenotes.txt ]; then
|
if [ -f shorewall-lite-${1}/releasenotes.txt ]; then
|
||||||
cat $SHOREWALL-${1}/releasenotes.txt shorewall-lite-${1}/releasenotes.txt > releasenotes.txt
|
cat $SHOREWALL-${1}/releasenotes.txt shorewall-lite-${1}/releasenotes.txt > releasenotes.txt
|
||||||
@ -94,4 +174,13 @@ else
|
|||||||
DEST=${USER}:${DEST}
|
DEST=${USER}:${DEST}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$COMMAND -r errata known_problems.txt patch-$1 ${1}.* releasenotes.txt shorewall*${1}*.tgz* shorewall*${1}*.bz2* $rpm $literpm $perlrpm $shellrpm $DEST
|
files="errata known_problems.txt releasenotes.txt patch-$1 ${1}.*"
|
||||||
|
|
||||||
|
[ -n "$UPLOADPERL" ] && files="$files shorewall-perl-${1}.* $perlrpm"
|
||||||
|
[ -n "$UPLOADCOMMON" ] && files="$files shorewall-common-${1}.* $rpm"
|
||||||
|
[ -n "$UPLOADSHELL" ] && files="$files shorewall-shell-${1}.* $shellrpm"
|
||||||
|
[ -n "$UPLOADLITE" ] && files="$files shorewall-lite-${1}.* $literpm"
|
||||||
|
[ -n "$UPLOADXML" ] && files="$files shorewall-docs-xml-${1}.* $literpm"
|
||||||
|
[ -n "$UPLOADHTML" ] && files="$files shorewall-docs-html-${1}.* $literpm"
|
||||||
|
|
||||||
|
$COMMAND -r $files $DEST
|
||||||
|
Loading…
x
Reference in New Issue
Block a user