[arch-releng] [PATCH] Check exit code argument otherwise the exit code is the one from the last command
Charles Vejnar
ce at vejnar.org
Wed Apr 20 05:40:39 EDT 2011
---
src/core/libs/lib-flowcontrol.sh | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/core/libs/lib-flowcontrol.sh b/src/core/libs/lib-flowcontrol.sh
index 4f3bbfa..9b7593c 100755
--- a/src/core/libs/lib-flowcontrol.sh
+++ b/src/core/libs/lib-flowcontrol.sh
@@ -215,8 +215,13 @@ start_installer ()
# $1 exit code (optional)
stop_installer ()
{
+ if [ -z "$1" ]; then
+ exit_code=0
+ else
+ exit_code=$1
+ fi
log "-------------- STOPPING INSTALLATION ----------"
cleanup_runtime
[ "$var_UI_TYPE" = dia ] && clear
- exit $1
+ exit $exit_code
}
--
1.7.3.4
More information about the arch-releng
mailing list