diff options
author | Colin Guthrie <colin@mageia.org> | 2014-07-29 22:22:20 +0100 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2014-07-29 22:22:20 +0100 |
commit | 93ad64817afac1c3e014948e83d604f34db1e671 (patch) | |
tree | 25d272ba6132197ebb300a4d36ed25ff92fcd8cd /mga-move-pkg | |
parent | 67cd8e961a48ec2201a56bcfb31a6a7cc9d50b89 (diff) | |
download | mgatools-93ad64817afac1c3e014948e83d604f34db1e671.tar mgatools-93ad64817afac1c3e014948e83d604f34db1e671.tar.gz mgatools-93ad64817afac1c3e014948e83d604f34db1e671.tar.bz2 mgatools-93ad64817afac1c3e014948e83d604f34db1e671.tar.xz mgatools-93ad64817afac1c3e014948e83d604f34db1e671.zip |
move: Fix sanity check display.user/colin/improvements
Also some cosmetic changes and fixes for the handling of the sanity check
response.
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" |