diff options
Diffstat (limited to 'mga-move-pkg')
-rwxr-xr-x | mga-move-pkg | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mga-move-pkg b/mga-move-pkg index beaf99e..fd2d22c 100755 --- a/mga-move-pkg +++ b/mga-move-pkg @@ -102,7 +102,7 @@ fi # Safety check -if [ -n "$exactsrpm" -a -z "$noconfirm" -o 'release' = "$destinationsubsection" ]; then +if [ -z "$exactsrpm" -o -n "$noconfirm" ]; then echo "This SRPM (and matching binaries) will be moved from '$sourcesubsection' to '$destinationsubsection':" echo "- $srcpkg" echo @@ -112,12 +112,10 @@ if [ -n "$exactsrpm" -a -z "$noconfirm" -o 'release' = "$destinationsubsection" echo fi - read -p "Are you sure? [Y/n] " yn - [ -z "$yn" ] yn=y - case $yn in - [Yy]*) continue;; - *) exit;; - esac + read -n 1 -p "Are you sure? [Y/n] " yn + [ -n "$yn" ] && echo + [ -z "$yn" -o "Y" = "$yn" ] && yn=y + [ "y" != "$yn" ] && exit fi function movepkg() @@ -169,7 +167,9 @@ echo >> "$mailcontent" $dryrun mv -v -f "$distribdir/$release/SRPMS/$section/$sourcesubsection/$srcpkg" "$distribdir/$release/SRPMS/$section/$destinationsubsection/" >>"$mailcommands" 2>&1 if [ -n "$dryrun" ]; then - cat "$mailcontent" "$mailcommands" + echo + echo "Raw Commands:" + cat "$mailcommands" else if [ -z "$sync" ]; then echo >>"$mailcontent" |