From 74e2c1a3fd131087f0be4b908655723f9b71dd6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20A=2E=20Ortega=20Froysa?= Date: Tue, 8 Nov 2022 16:40:13 +0100 Subject: [PATCH] Use local variables. --- isidore.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/isidore.sh b/isidore.sh index 67aeb35..71fa9eb 100755 --- a/isidore.sh +++ b/isidore.sh @@ -128,9 +128,9 @@ function new_project() { echo "$PROJECT_NAME v$ISIDORE_VERSION" - NEW_PROJECT_DIR=$1 - NEW_PROJECT_NAME="New Project" - NEW_PROJECT_URL="http://example.com/" + local NEW_PROJECT_DIR=$1 + local NEW_PROJECT_NAME="New Project" + local NEW_PROJECT_URL="http://example.com/" if [ $2 == 1 ] then echo -n "Project name: " @@ -177,7 +177,7 @@ function build_project() { check_in_project - CFG_HEADER_FILE="$TMP_DIR/config-header.php" + local CFG_HEADER_FILE="$TMP_DIR/config-header.php" mkdir -p $OUTPUT_DIR mkdir -p $TMP_DIR @@ -193,7 +193,7 @@ function build_project() do cat $CFG_HEADER_FILE $i > $TMP_DIR/$i : ${i:${#SOURCE_DIR}} - OUT_FILE="$OUTPUT_DIR/${_: :-4}" + local OUT_FILE="$OUTPUT_DIR/${_: :-4}" if [ $1 == 1 ] then echo "Building $OUT_FILE ..." @@ -203,7 +203,7 @@ function build_project() for i in $(find $SOURCE_DIR -type f -not -name '*.php') do - OUT_FILE="$OUTPUT_DIR/${i:${#SOURCE_DIR}}" + local OUT_FILE="$OUTPUT_DIR/${i:${#SOURCE_DIR}}" if [ $1 == 1 ] then echo "Copying $OUT_FILE ..."