aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xapprove.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/approve.sh b/approve.sh
index 7de0084..8358965 100755
--- a/approve.sh
+++ b/approve.sh
@@ -6,7 +6,6 @@ DESTBASEDIR=/home/mandrake/uploads/approved
REJECTEDDIR=/home/mandrake/uploads/rejected
LATERBASEDIR=/home/mandrake/uploads/later
DISTRO=cooker
-UPDATEDISTRO="2007.1"
function list() {
echo "The following packages are currently queued:" >&2
@@ -42,7 +41,7 @@ function list_approved() {
# $1 = id = package id
# $2 = dest = destination queue
-# $3 = media = forced distro/media, like "2007.1/updates/release/"
+# $3 = media = forced media, like "updates/"
function move() {
id="$1"
dest="$2"
@@ -61,9 +60,9 @@ function move() {
for srcpath in $packages; do
destpath=$(echo "$srcpath" | sed "s@$SRCBASEDIR@$dest@")
if [ -n "$media" ]; then
- destpath=$(echo "$destpath" | sed "s@\($dest\)/\(\([^/]\+/\)\{3\}\)@\1/$media@")
+ destpath=$(echo "$destpath" | sed "s@\($dest\)/\(\([^/]\+/\)\{2\}\)\([^/]\+/\)@\1/\2$media@")
fi
- mv "$srcpath" "$destpath"
+ mv "$srcpath" "$destpath"
done
echo "done."
}
@@ -97,7 +96,7 @@ elif [ "$1" == "--approve" ]; then
done
elif [ "$1" == "--updates" ]; then
while [ -n "$2" ]; do
- move "$2" "$DESTBASEDIR" "$UPDATEDISTRO/updates/release/"
+ move "$2" "$DESTBASEDIR" "updates/"
shift
done
elif [ "$1" == "--later" ]; then