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(-) (limited to 'functions') diff --git a/functions/aliases.sh b/functions/aliases.sh index b690a0688..12d2938cd 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 4180ffa88..1103d2b6b 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 0ac1bf2f8..4c476d2eb 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 9e92a94b3..74fff29f8 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 d66578752..4d53cb25e 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 c4f874375..771fffca7 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 b99b1a3e9..3cd570731 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 32b1148dc..d6736341f 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 44c2a6713..831def233 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 0c3989f90..414d586a7 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 e9573a8f2..47a89c45f 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 8a79460de..022c0bf55 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 c0d3fe6eb..0d4aa73bb 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 0693b42eb..dfb22cb57 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 d92c77c9e..f486ec982 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 3c470f988..a788771be 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 f1796caa4..66d68399a 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 4196a1236..03e2e1c97 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 bcb82524a..98b25e3df 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 f84de4d73..e116a78b9 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 8f67a6629..303b68927 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 08161ae6d..d1a4e6357 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 7ae1efbd8..ba0a339b1 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 ee013dd69..581e59acf 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.2.3