Don't use set -e in sourced functions, this is the job of the actual executed script.
This commit is contained in:
parent
1c1e7db6c4
commit
37d2fb4b0f
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Find_files ()
|
Find_files ()
|
||||||
{
|
{
|
||||||
(ls "${@}" | grep -qs .) > /dev/null 2>&1
|
(ls "${@}" | grep -qs .) > /dev/null 2>&1
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Check_architecture ()
|
Check_architecture ()
|
||||||
{
|
{
|
||||||
ARCHITECTURES="${@}"
|
ARCHITECTURES="${@}"
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Arguments ()
|
Arguments ()
|
||||||
{
|
{
|
||||||
ARGUMENTS="$(getopt --longoptions breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options c:huv --shell sh -- "${@}")"
|
ARGUMENTS="$(getopt --longoptions breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options c:huv --shell sh -- "${@}")"
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Restore_cache ()
|
Restore_cache ()
|
||||||
{
|
{
|
||||||
DIRECTORY="${1}"
|
DIRECTORY="${1}"
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Chroot ()
|
Chroot ()
|
||||||
{
|
{
|
||||||
CHROOT="${1}"; shift
|
CHROOT="${1}"; shift
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
NO_COLOR="[0m"
|
NO_COLOR="[0m"
|
||||||
|
|
||||||
UNDERSCORE="[4m"
|
UNDERSCORE="[4m"
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
PROGRAM="$(basename ${0})"
|
PROGRAM="$(basename ${0})"
|
||||||
VERSION="1.0.1"
|
VERSION="1.0.1"
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Get_conffiles ()
|
Get_conffiles ()
|
||||||
{
|
{
|
||||||
if [ -n "${LH_CONFIG}" ]
|
if [ -n "${LH_CONFIG}" ]
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Cursor_goto_position ()
|
Cursor_goto_position ()
|
||||||
{
|
{
|
||||||
__LINE="${1}"
|
__LINE="${1}"
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Set_defaults ()
|
Set_defaults ()
|
||||||
{
|
{
|
||||||
## config/common
|
## config/common
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Echo ()
|
Echo ()
|
||||||
{
|
{
|
||||||
STRING="${1}"
|
STRING="${1}"
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Exit ()
|
Exit ()
|
||||||
{
|
{
|
||||||
if [ "${LH_DEBUG}" = "enabled" ]
|
if [ "${LH_DEBUG}" = "enabled" ]
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Help ()
|
Help ()
|
||||||
{
|
{
|
||||||
Echo "%s - %s" "${PROGRAM}" "${DESCRIPTION}"
|
Echo "%s - %s" "${PROGRAM}" "${DESCRIPTION}"
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# gettext domain (.mo file name)
|
# gettext domain (.mo file name)
|
||||||
export TEXTDOMAIN=live-helper
|
export TEXTDOMAIN=live-helper
|
||||||
# locale dir for gettext codes
|
# locale dir for gettext codes
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Check_lockfile ()
|
Check_lockfile ()
|
||||||
{
|
{
|
||||||
FILE="${1}"
|
FILE="${1}"
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Losetup ()
|
Losetup ()
|
||||||
{
|
{
|
||||||
DEVICE="${1}"
|
DEVICE="${1}"
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Check_package ()
|
Check_package ()
|
||||||
{
|
{
|
||||||
FILE="${1}"
|
FILE="${1}"
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Expand_packagelist ()
|
Expand_packagelist ()
|
||||||
{
|
{
|
||||||
_LH_EXPAND_QUEUE="$(basename "${1}")"
|
_LH_EXPAND_QUEUE="$(basename "${1}")"
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Debian releases
|
# Debian releases
|
||||||
RELEASE_etch="4.0 r4"
|
RELEASE_etch="4.0 r4"
|
||||||
RELEASE_lenny="5.0 r0"
|
RELEASE_lenny="5.0 r0"
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Check_stagefile ()
|
Check_stagefile ()
|
||||||
{
|
{
|
||||||
FILE="${1}"
|
FILE="${1}"
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Check_templates ()
|
Check_templates ()
|
||||||
{
|
{
|
||||||
PACKAGE="${1}"
|
PACKAGE="${1}"
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Usage ()
|
Usage ()
|
||||||
{
|
{
|
||||||
Echo "%s - %s" "${PROGRAM}" "${DESCRIPTION}"
|
Echo "%s - %s" "${PROGRAM}" "${DESCRIPTION}"
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Version ()
|
Version ()
|
||||||
{
|
{
|
||||||
Echo "%s, version %s" "${PROGRAM}" "${VERSION}"
|
Echo "%s, version %s" "${PROGRAM}" "${VERSION}"
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# This is free software, and you are welcome to redistribute it
|
# This is free software, and you are welcome to redistribute it
|
||||||
# under certain conditions; see COPYING for details.
|
# under certain conditions; see COPYING for details.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
Apt ()
|
Apt ()
|
||||||
{
|
{
|
||||||
case "${LH_APT}" in
|
case "${LH_APT}" in
|
||||||
|
|
Loading…
Reference in New Issue