commit 64db5f44c29802ba99cf4cacf76b10a157a5cc05
Author: Jan Pokorný <jpokorny(a)redhat.com>
Date: Thu Mar 8 11:20:32 2012 +0100
third-party/init.sh: no extra deletion exit code handling
such craziness should never have been introduced
Signed-off-by: Jan Pokorný <jpokorny(a)redhat.com>
third-party/init.sh | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/third-party/init.sh b/third-party/init.sh
index eabddf2..ad2dc44 100755
--- a/third-party/init.sh
+++ b/third-party/init.sh
@@ -5,7 +5,6 @@
# NOTE: this is always to be run from within git repo so things like
# "git rev-parse" will work (see do_git_submodule)
# NOTE: really stupid, no timestamping logic and similar fancy stuff
-# TODO: remove RET_DEL etc., deletion should be isolated now?
# TODO: new action "ahead" to check new versions (tags in git, etc.)
#
@@ -19,8 +18,6 @@ CLR_WRN=33
CLR_INF=35
CLR_CMD=34
-RET_DEL=64
-
PRINTED=false
GIT_PREFIX=$(git rev-parse --show-prefix)
@@ -32,7 +29,7 @@ check_nargs () {
}
check_ret () {
- [ $1 -ne 0 -a $1 -ne $RET_DEL ] \
+ [ $1 -ne 0 ] \
&& do_announce "action failed with exit status $1" $CLR_BAD
return $1
}
@@ -42,7 +39,6 @@ do_del () {
do_announce "has to be confirmed (y)..." $CLR_INF
rm -rfI -- "$@" 2>/dev/null
[ $? -eq 0 ] || do_announce "something to be deleted not present" $CLR_WRN
- return $RET_DEL
}
do_announce () {
@@ -196,7 +192,7 @@ init_git_submodule () {
do_announce "$1 $submodule (git submodule)" $CLR_SCR delimit
do_action $1 "$submodule" get_refresh_hook $arg_last
ret=$?
- [ $ret -ne 0 ] && [ $ret -ne $RET_DEL ] && break
+ [ $ret -ne 0 ] && break
done
check_ret $ret
}
@@ -309,7 +305,7 @@ main () {
$CHOICES)
$1 $action
ret=\$?
- [ \$ret -ne 0 -a \$ret -ne $RET_DEL ] && return \$ret
+ [ \$ret -ne 0 ] && return \$ret
shift
continue;;
all)
Show replies by date