summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dienstbier <mdienstbier@googlemail.com>2010-03-24 18:43:01 +0100
committerMatthias Dienstbier <mdienstbier@googlemail.com>2010-03-24 18:43:01 +0100
commit447fc52078b7e9a78e1db3590161be16cec170a3 (patch)
treedc8cb857c79978980f509a0a86f3d5a498e2384b
parent47fbd4531a556e62be50b12f3376e73e9caaa4c7 (diff)
fix returns and exits in subshells
-rwxr-xr-xsrc/aif.sh6
-rw-r--r--src/core/libs/lib-blockdevices-filesystems.sh2
-rw-r--r--src/core/libs/lib-ui-interactive.sh2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/aif.sh b/src/aif.sh
index 2f9d31b..a64bb02 100755
--- a/src/aif.sh
+++ b/src/aif.sh
@@ -16,12 +16,12 @@ export LC_COLLATE=C # for consistent sorting behavior
###### Early bootstrap ######
# load the lib-ui, it is one we need everywhere so we must load it early.
-source $LIB_CORE/libs/lib-ui.sh || ( echo "Something went wrong while sourcing library $LIB_CORE/libs/lib-ui.sh" >&2 && exit 2)
+source $LIB_CORE/libs/lib-ui.sh || { echo "Something went wrong while sourcing library $LIB_CORE/libs/lib-ui.sh" >&2 ; exit 2; }
ui_init
# load the lib-flowcontrol. we also need some of it's functions early (like usage()).
-source $LIB_CORE/libs/lib-flowcontrol.sh || ( echo "Something went wrong while sourcing library $LIB_CORE/libs/lib-flowcontrol.sh" >&2 && exit 2)
+source $LIB_CORE/libs/lib-flowcontrol.sh || { echo "Something went wrong while sourcing library $LIB_CORE/libs/lib-flowcontrol.sh" >&2 ; exit 2; }
# lib-misc. we need it early, at least for check_is_in whis is used by the debug function.
-source $LIB_CORE/libs/lib-misc.sh || ( echo "Something went wrong while sourcing library $LIB_CORE/libs/lib-misc.sh" >&2 && exit 2)
+source $LIB_CORE/libs/lib-misc.sh || { echo "Something went wrong while sourcing library $LIB_CORE/libs/lib-misc.sh" >&2 ; exit 2; }
# default function to process additional arguments. can be overridden by procedures.
process_args ()
diff --git a/src/core/libs/lib-blockdevices-filesystems.sh b/src/core/libs/lib-blockdevices-filesystems.sh
index be4c270..07eee5d 100644
--- a/src/core/libs/lib-blockdevices-filesystems.sh
+++ b/src/core/libs/lib-blockdevices-filesystems.sh
@@ -742,7 +742,7 @@ process_filesystem ()
# don't handle anything else here, we will error later
esac
BLOCK_ROLLBACK_USELESS=0
- [ "$ret" -gt 0 ] && ( show_warning "process_filesystem error" "Error creating filesystem $fs_type on $part." ; return 1 )
+ [ "$ret" -gt 0 ] && { show_warning "process_filesystem error" "Error creating filesystem $fs_type on $part."; return 1; }
sleep 2
fi
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index 541ce23..239eab0 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -753,7 +753,7 @@ interactive_filesystems() {
interactive_select_packages() {
# set up our install location if necessary and sync up so we can get package lists
- target_prepare_pacman || ( show_warning 'Pacman preparation failure' "Pacman preparation failed! Check $LOG for errors." && return 1 )
+ target_prepare_pacman || { show_warning 'Pacman preparation failure' "Pacman preparation failed! Check $LOG for errors."; return 1; }
repos=`list_pacman_repos target`
notify "Package selection is split into two stages. First you will select package groups that contain packages you may be interested in. Then you will be presented with a full list of packages for each group, allowing you to fine-tune.\n\n