mirror of
https://gitlab.com/shorewall/code.git
synced 2025-02-02 10:59:27 +01:00
Implement package selection in stage
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@7752 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
bca7715d00
commit
e094f83680
@ -1,15 +1,91 @@
|
||||
#/bin/sh
|
||||
|
||||
usage() {
|
||||
echo "Usage: stage [-pclsxh] <version>"
|
||||
|
||||
rpm=
|
||||
literpm=
|
||||
perldir=
|
||||
shelldir=
|
||||
perlrpm=
|
||||
shellrpm=
|
||||
|
||||
DEST=
|
||||
USER="webadmin@mail.shorewall.net"
|
||||
SHOREWALL=shorewall
|
||||
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
|
||||
4.*Beta*|4.*RC*)
|
||||
DEST="/srv/ftp/pub/shorewall/development/staging/${1%.*}/shorewall-$1"
|
||||
@ -19,6 +95,10 @@ case $1 in
|
||||
perlrpm=shorewall-perl-${1%-*}-0${1#*-}.noarch.rpm
|
||||
shellrpm=shorewall-shell-${1%-*}-0${1#*-}.noarch.rpm
|
||||
;;
|
||||
4.0.*-*)
|
||||
DEST="/srv/ftp/pub/shorewall/development/staging/${1%.*}/shorewall-${1%-*}"
|
||||
SHOREWALL=shorewall-common
|
||||
;;
|
||||
4.0.*)
|
||||
DEST="/srv/ftp/pub/shorewall/development/staging/${1%.*}/shorewall-$1"
|
||||
SHOREWALL=shorewall-common
|
||||
@ -45,7 +125,7 @@ case $1 in
|
||||
rpm=shorewall-${1}-1.noarch.rpm
|
||||
;;
|
||||
3.*Beta*|*RC*)
|
||||
DEST="/srv/ftp/pub/shorewall/development"
|
||||
DEST="/srv/ftp/pub/shorewall/development/staging/${1%.*}/shorewall-$1"
|
||||
rpm=shorewall-${1%-*}-0${1#*-}.noarch.rpm
|
||||
literpm=shorewall-lite-${1%-*}-0${1#*-}.noarch.rpm
|
||||
;;
|
||||
@ -62,7 +142,7 @@ case $1 in
|
||||
literpm=shorewall-lite-${1}-1.noarch.rpm
|
||||
;;
|
||||
*.[2468].*)
|
||||
DEST="/srv/ftp/pub/shorewall/${1%.*}/development/staging//${1%.*}shorewall-$1"
|
||||
DEST="/srv/ftp/pub/shorewall/development/staging/${1%.*}/shorewall-$1"
|
||||
rpm=shorewall-${1}-1.noarch.rpm
|
||||
literpm=shorewall-lite-${1}-1.noarch.rpm
|
||||
perlrpm=shorewall-perl-${1}-1.noarch.rpm
|
||||
@ -78,7 +158,7 @@ esac
|
||||
|
||||
[ -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
|
||||
cat $SHOREWALL-${1}/releasenotes.txt shorewall-lite-${1}/releasenotes.txt > releasenotes.txt
|
||||
@ -94,4 +174,13 @@ else
|
||||
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
|
||||
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…
Reference in New Issue
Block a user