Commit ece43040 authored by Vitaly Lipatov's avatar Vitaly Lipatov

simplify set_incoming

parent bc38e990
......@@ -136,7 +136,7 @@ function release_check()
done
}
[ -n "$UPDATES" ] && set_incoming_updates $MENV || set_incoming $MENV
set_incoming $MENV
if [ -n "${DELETENOW}" ]; then
echog "Removing from '$RSYNCINCOMING/$INCOMING/'"
......@@ -181,14 +181,11 @@ if [ -n "$SIGN" ]; then
if [ -n "${UPLOADNOW}" ] ; then
echog "Uploading to '$RSYNCINCOMING/$INCOMING/'"
check_key
#set_incoming $MENV
#uploadOLD=$(basename `mktemp -d $UPLOADDIR.old.XXX`)
#rmdir $uploadOLD
rsync -vay --partial --progress $CHECKSUM \
-e ssh $LISTBUILT $RSYNCINCOMING/$INCOMING/ && \
echo "---------------------" && \
echog "All files synced" || fatal "Error during rsync"
#mv $UPLOADDIR $uploadOLD && mkdir $UPLOADDIR
for i in $LISTBUILT ; do
LOGFILE="$LOGDIR/`basename $i .src.rpm`$MENVARG.log"
echo >>$LOGFILE
......
......@@ -468,69 +468,32 @@ check_key()
return 0
}
set_incoming()
get_distr_version()
{
INCOMING="Sisyphus"
case "$1" in
("M24")
INCOMING="backports/2.4"
;;
("M23")
INCOMING="backports/2.3"
;;
("M30")
INCOMING="backports/3.0"
;;
("M40")
INCOMING="backports/4.0"
;;
("M41")
INCOMING="backports/4.1"
;;
("M42")
INCOMING="backports/4.2"
;;
("DD")
INCOMING="Daedalus"
;;
("SS")
INCOMING="Sisyphus"
;;
esac
echo $1 | sed -e "s|M\([0-9]\)\([0-9]\)|\1\.\2|g" | sed -e "s|SS|Sisyphus|g" | sed -e "s|DD|Daedalus|g"
}
set_incoming_updates()
set_incoming()
{
INCOMING="Sisyphus"
test -z "$1" && return
case "$1" in
("M24")
INCOMING="updates/2.4"
;;
("M23")
INCOMING="updates/2.3"
;;
("M30")
INCOMING="updates/3.0"
;;
("M40")
INCOMING="updates/4.0"
;;
("M41")
INCOMING="updates/4.1"
;;
("M42")
INCOMING="updates/4.2"
;;
("DD")
INCOMING="Daedalus"
;;
("SS")
INCOMING="Sisyphus"
;;
*)
if [ -n "$UPDATES" ] ; then
INCOMING="updates/`get_distr_version $1`"
else
INCOMING="backports/`get_distr_version $1`"
fi
;;
esac
}
add_changelog_helper()
{
# don't work sometime?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment