Create base/ directory during upload

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@7869 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-12-08 21:04:21 +00:00
parent 8889d86d75
commit 1dba4513b7
2 changed files with 20 additions and 4 deletions

View File

@ -21,6 +21,7 @@ UPLOADLITE=
UPLOADXML=
UPLOADHTML=
PARTIAL=Yes
BASE=
done=
@ -97,6 +98,7 @@ case $1 in
literpm=shorewall-lite-${1%-*}-0${1#*-}.noarch.rpm
perlrpm=shorewall-perl-${1%-*}-0${1#*-}.noarch.rpm
shellrpm=shorewall-shell-${1%-*}-0${1#*-}.noarch.rpm
BASE=Yes
;;
4.0.*-*)
DEST="/srv/ftp/pub/shorewall/development/staging/${1%.*}/shorewall-${1}"
@ -109,6 +111,7 @@ case $1 in
literpm=shorewall-lite-${1}-1.noarch.rpm
perlrpm=shorewall-perl-${1}-1.noarch.rpm
shellrpm=shorewall-shell-${1}-1.noarch.rpm
BASE=Yes
;;
4.1.*)
DEST="/srv/ftp/pub/shorewall/development/staging/${1%.*}/shorewall-$1"
@ -117,6 +120,7 @@ case $1 in
literpm=shorewall-lite-${1}-1.noarch.rpm
perlrpm=shorewall-perl-${1}-1.noarch.rpm
shellrpm=shorewall-shell-${1}-1.noarch.rpm
BASE=Yes
;;
3.*[13579].*)
DEST="/srv/ftp/pub/shorewall/development/staging/${1%.*}/shorewall-$1"
@ -173,14 +177,14 @@ fi
if [ "$HOSTNAME" = lists ]; then
mkdir -p $DEST
[ -n "$BASE" ] && mkdir $DEST/base
COMMAND=cp
else
ssh $USER mkdir -p $DEST
[ -n "$BASE" ] && ssh $USER mkdir -p $DEST
DEST=${USER}:${DEST}
fi
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"
@ -188,4 +192,8 @@ files="errata known_problems.txt releasenotes.txt patch-$1 ${1}.*"
[ -n "$UPLOADXML" ] && files="$files shorewall-docs-xml-${1}.* $literpm"
[ -n "$UPLOADHTML" ] && files="$files shorewall-docs-html-${1}.* $literpm"
[ -n "$BASE" ] && $COMMAND $files $DEST/base
files="errata known_problems.txt releasenotes.txt patch-$1 ${1}.*"
$COMMAND -r $files $DEST

View File

@ -21,6 +21,7 @@ UPLOADLITE=
UPLOADXML=
UPLOADHTML=
PARTIAL=Yes
BASE=
done=
@ -97,6 +98,7 @@ case $1 in
literpm=shorewall-lite-${1%-*}-0${1#*-}.noarch.rpm
perlrpm=shorewall-perl-${1%-*}-0${1#*-}.noarch.rpm
shellrpm=shorewall-shell-${1%-*}-0${1#*-}.noarch.rpm
BASE=Yes
;;
4.0.*-*)
DEST="/srv/ftp/pub/shorewall/${1%.*}/shorewall-${1%-*}"
@ -109,6 +111,7 @@ case $1 in
literpm=shorewall-lite-${1}-1.noarch.rpm
perlrpm=shorewall-perl-${1}-1.noarch.rpm
shellrpm=shorewall-shell-${1}-1.noarch.rpm
BASE=Yes
;;
4.1.*-*)
DEST="/srv/ftp/pub/shorewall/development/${1%.*}/shorewall-${1%-*}"
@ -121,6 +124,7 @@ case $1 in
literpm=shorewall-lite-${1}-1.noarch.rpm
perlrpm=shorewall-perl-${1}-1.noarch.rpm
shellrpm=shorewall-shell-${1}-1.noarch.rpm
BASE=Yes
;;
3.*[13579].*)
DEST="/srv/ftp/pub/shorewall/development/${1%.*}/shorewall-$1"
@ -177,14 +181,14 @@ fi
if [ "$HOSTNAME" = lists ]; then
mkdir -p $DEST
[ -n "$BASE" ] && mkdir $DEST/base
COMMAND=cp
else
ssh $USER mkdir -p $DEST
[ -n "$BASE" ] && ssh $USER mkdir -p $DEST
DEST=${USER}:${DEST}
fi
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"
@ -192,4 +196,8 @@ files="errata known_problems.txt releasenotes.txt patch-$1 ${1}.*"
[ -n "$UPLOADXML" ] && files="$files shorewall-docs-xml-${1}.* $literpm"
[ -n "$UPLOADHTML" ] && files="$files shorewall-docs-html-${1}.* $literpm"
[ -n "$BASE" ] && $COMMAND $files $DEST/base
files="errata known_problems.txt releasenotes.txt patch-$1 ${1}.*"
$COMMAND -r $files $DEST