From 37d2fb4b0f5ac4c92ca589ab46d567f06551971f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 29 Oct 2008 09:25:54 +0100 Subject: Don't use set -e in sourced functions, this is the job of the actual executed script. --- functions/aliases.sh | 2 -- functions/architecture.sh | 2 -- functions/arguments.sh | 2 -- functions/cache.sh | 2 -- functions/chroot.sh | 2 -- functions/color.sh | 2 -- functions/common.sh | 2 -- functions/conffile.sh | 2 -- functions/cursor.sh | 2 -- functions/defaults.sh | 2 -- functions/echo.sh | 2 -- functions/exit.sh | 2 -- functions/help.sh | 2 -- functions/l10n.sh | 2 -- functions/lockfile.sh | 2 -- functions/losetup.sh | 2 -- functions/packages.sh | 2 -- functions/packageslists.sh | 2 -- functions/releases.sh | 2 -- functions/stagefile.sh | 2 -- functions/templates.sh | 2 -- functions/usage.sh | 2 -- functions/version.sh | 2 -- functions/wrapper.sh | 2 -- 24 files changed, 48 deletions(-) diff --git a/functions/aliases.sh b/functions/aliases.sh index b690a06..12d2938 100755 --- a/functions/aliases.sh +++ b/functions/aliases.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Find_files () { (ls "${@}" | grep -qs .) > /dev/null 2>&1 diff --git a/functions/architecture.sh b/functions/architecture.sh index 4180ffa..1103d2b 100755 --- a/functions/architecture.sh +++ b/functions/architecture.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Check_architecture () { ARCHITECTURES="${@}" diff --git a/functions/arguments.sh b/functions/arguments.sh index 0ac1bf2..4c476d2 100755 --- a/functions/arguments.sh +++ b/functions/arguments.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Arguments () { ARGUMENTS="$(getopt --longoptions breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options c:huv --shell sh -- "${@}")" diff --git a/functions/cache.sh b/functions/cache.sh index 9e92a94..74fff29 100755 --- a/functions/cache.sh +++ b/functions/cache.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Restore_cache () { DIRECTORY="${1}" diff --git a/functions/chroot.sh b/functions/chroot.sh index d665787..4d53cb2 100755 --- a/functions/chroot.sh +++ b/functions/chroot.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Chroot () { CHROOT="${1}"; shift diff --git a/functions/color.sh b/functions/color.sh index c4f8743..771fffc 100755 --- a/functions/color.sh +++ b/functions/color.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - NO_COLOR="" UNDERSCORE="" diff --git a/functions/common.sh b/functions/common.sh index b99b1a3..3cd5707 100755 --- a/functions/common.sh +++ b/functions/common.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - PROGRAM="$(basename ${0})" VERSION="1.0.1" diff --git a/functions/conffile.sh b/functions/conffile.sh index 32b1148..d673634 100755 --- a/functions/conffile.sh +++ b/functions/conffile.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Get_conffiles () { if [ -n "${LH_CONFIG}" ] diff --git a/functions/cursor.sh b/functions/cursor.sh index 44c2a67..831def2 100755 --- a/functions/cursor.sh +++ b/functions/cursor.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Cursor_goto_position () { __LINE="${1}" diff --git a/functions/defaults.sh b/functions/defaults.sh index 0c3989f..414d586 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Set_defaults () { ## config/common diff --git a/functions/echo.sh b/functions/echo.sh index e9573a8..47a89c4 100755 --- a/functions/echo.sh +++ b/functions/echo.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Echo () { STRING="${1}" diff --git a/functions/exit.sh b/functions/exit.sh index 8a79460..022c0bf 100755 --- a/functions/exit.sh +++ b/functions/exit.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Exit () { if [ "${LH_DEBUG}" = "enabled" ] diff --git a/functions/help.sh b/functions/help.sh index c0d3fe6..0d4aa73 100755 --- a/functions/help.sh +++ b/functions/help.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Help () { Echo "%s - %s" "${PROGRAM}" "${DESCRIPTION}" diff --git a/functions/l10n.sh b/functions/l10n.sh index 0693b42..dfb22cb 100755 --- a/functions/l10n.sh +++ b/functions/l10n.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - # gettext domain (.mo file name) export TEXTDOMAIN=live-helper # locale dir for gettext codes diff --git a/functions/lockfile.sh b/functions/lockfile.sh index d92c77c..f486ec9 100755 --- a/functions/lockfile.sh +++ b/functions/lockfile.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Check_lockfile () { FILE="${1}" diff --git a/functions/losetup.sh b/functions/losetup.sh index 3c470f9..a788771 100755 --- a/functions/losetup.sh +++ b/functions/losetup.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Losetup () { DEVICE="${1}" diff --git a/functions/packages.sh b/functions/packages.sh index f1796ca..66d6839 100755 --- a/functions/packages.sh +++ b/functions/packages.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Check_package () { FILE="${1}" diff --git a/functions/packageslists.sh b/functions/packageslists.sh index 4196a12..03e2e1c 100755 --- a/functions/packageslists.sh +++ b/functions/packageslists.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Expand_packagelist () { _LH_EXPAND_QUEUE="$(basename "${1}")" diff --git a/functions/releases.sh b/functions/releases.sh index bcb8252..98b25e3 100755 --- a/functions/releases.sh +++ b/functions/releases.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - # Debian releases RELEASE_etch="4.0 r4" RELEASE_lenny="5.0 r0" diff --git a/functions/stagefile.sh b/functions/stagefile.sh index f84de4d..e116a78 100755 --- a/functions/stagefile.sh +++ b/functions/stagefile.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Check_stagefile () { FILE="${1}" diff --git a/functions/templates.sh b/functions/templates.sh index 8f67a66..303b689 100755 --- a/functions/templates.sh +++ b/functions/templates.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Check_templates () { PACKAGE="${1}" diff --git a/functions/usage.sh b/functions/usage.sh index 08161ae..d1a4e63 100755 --- a/functions/usage.sh +++ b/functions/usage.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Usage () { Echo "%s - %s" "${PROGRAM}" "${DESCRIPTION}" diff --git a/functions/version.sh b/functions/version.sh index 7ae1efb..ba0a339 100755 --- a/functions/version.sh +++ b/functions/version.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Version () { Echo "%s, version %s" "${PROGRAM}" "${VERSION}" diff --git a/functions/wrapper.sh b/functions/wrapper.sh index ee013dd..581e59a 100755 --- a/functions/wrapper.sh +++ b/functions/wrapper.sh @@ -7,8 +7,6 @@ # This is free software, and you are welcome to redistribute it # under certain conditions; see COPYING for details. -set -e - Apt () { case "${LH_APT}" in -- cgit v1.0