From 61f2913e709b3fcbcadf6287b9534cb74e804736 Mon Sep 17 00:00:00 2001 From: g0t mi1k Date: Mon, 20 Jan 2025 10:38:31 +0000 Subject: [PATCH] Change directory as soon as possible --- build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 16f5e97..2ffff8c 100755 --- a/build.sh +++ b/build.sh @@ -128,14 +128,16 @@ require_package() { # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# Allowed command line options -. $(dirname $0)/.getopt.sh +# Change directory into where the script is +cd $(dirname $0)/ # Define log file BUILD_LOG="$(pwd)/build.log" debug "BUILD_LOG: $BUILD_LOG" # Create empty file : > "$BUILD_LOG" +# Allowed command line options +source .getopt.sh # Parsing command line options (see .getopt.sh) temp=$(getopt -o "$BUILD_OPTS_SHORT" -l "$BUILD_OPTS_LONG,get-image-path" -- "$@") @@ -240,7 +242,6 @@ if [ "$ACTION" = "clean" ]; then exit 0 fi -cd $(dirname $0) # Create image output location mkdir -pv $TARGET_DIR/$TARGET_SUBDIR [ $? -eq 0 ] || failure