From 4c9b68c8cbea9c115d8bcb3fb223ff15d83f4356 Mon Sep 17 00:00:00 2001 From: Jesus Alvarez Date: Sun, 17 Apr 2016 21:54:59 -0700 Subject: [PATCH] Prevent exit output when using usage() --- build.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index 95803f1..6670dbc 100755 --- a/build.sh +++ b/build.sh @@ -35,10 +35,6 @@ if ! source ${SCRIPT_DIR}/conf.sh; then fi -trap 'trap_abort' INT QUIT TERM HUP -trap 'trap_exit' EXIT - - usage() { echo "build.sh - A build script for archzfs" echo @@ -74,9 +70,14 @@ usage() { echo " build.sh lts update :: Update PKGBUILDS only" echo " build.sh git update make -u :: Update PKGBUILDs, update the chroot, and make all of the packages" echo " build.sh lts update-test test -u :: Update PKGBUILDs (use testing versions), update the chroot, and make all of the packages" + trap - EXIT # Prevents exit log output } +trap 'trap_abort' INT QUIT TERM HUP +trap 'trap_exit' EXIT + + build_def_sources() { for PKG in ${AZB_DEF_PKG_LIST}; do msg "Building source for $PKG";