From 8d34cf49ad72e556b88033202f7dde130d80fa74 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 25 Feb 2013 20:13:48 +0100 Subject: Several fixes and improvements: - return uid and gid again for add_user and add_group - abort execution if sourcing the .build or .conf file of a module fails - make sure lightdm user and group exists when building the ldm module - use tarcopy in all modules if appropriate --- remote/setup_tools | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'remote/setup_tools') diff --git a/remote/setup_tools b/remote/setup_tools index bf3f5157..74cc1c78 100755 --- a/remote/setup_tools +++ b/remote/setup_tools @@ -18,20 +18,20 @@ initial_checks () read_config () { - local TOOL_CONFIG=${TOOL_DIR}/${TOOL}/${TOOL}.conf + local TOOL_CONFIG="${TOOL_DIR}/${TOOL}/${TOOL}.conf" - [ ! -e ${TOOL_CONFIG} ] && perror "Config for '$TOOL' not found." + [ ! -e "${TOOL_CONFIG}" ] && perror "Config for '$TOOL' not found." - . ${TOOL_CONFIG} + . "${TOOL_CONFIG}" || perror "Sourcing '${TOOL_CONFIG}' failed." } read_build () { - local BUILD_SCRIPT=${TOOL_DIR}/${TOOL}/${TOOL}.build + local BUILD_SCRIPT="${TOOL_DIR}/${TOOL}/${TOOL}.build" - [ ! -e ${BUILD_SCRIPT} ] && perror "Build script for specified tool not found." + [ ! -e "${BUILD_SCRIPT}" ] && perror "Build script for specified tool not found." - . ${BUILD_SCRIPT} + . "${BUILD_SCRIPT}" || perror "Sourcing '${BUILD_SCRIPT}' failed." } copyfileswithdependencies () @@ -190,13 +190,14 @@ generate_stage32 () { fi # now iterate over given tools and copy them - cd ${TOOL_DIR} + cd "${TOOL_DIR}" while (( "$#" )); do TOOL=$1 + TOOL_STR="" + pinfo ">>>>>>>>>>>>>>>>> Processing module [ $TOOL ]" + TOOL_STR="[${TOOL}]" if [ -d ${TOOL} ]; then - TOOL_STR="[${TOOL}]" - pinfo "## ## Processing module ## ##" #[ "x$DEBUG" != "x1" ] \ # && echo "Logging to ${TOOL_DIR}/${TOOL}/stage32.log" \ @@ -225,13 +226,13 @@ generate_stage32 () { #[ "x$DEBUG" != "x1" ] && exec 1>&6 6>&- # TODO pinfo "## ## Module completed ## ##" - TOOL_STR="" else perror "Tool directory for '$TOOL' not found." # maybe make this a warning instead of error? fi shift done + TOOL_STR="" } clean_tools() { -- cgit v1.2.3-55-g7522