From f4c7d5ff646c5c0284a4ea36d96602505d6c7b89 Mon Sep 17 00:00:00 2001 From: Chai Feng Date: Tue, 8 Oct 2024 10:08:09 +0800 Subject: [PATCH] Update build.sh --- build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 96c19fd..917a624 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -set -euo pipefail IFS='.' read -r __major __minor _ <<< "${BASH_VERSION:-0.0.0}" if [ "$__major" -lt 4 ] || { [ "$__major" -eq 4 ] && [ "$__minor" -lt 3 ]; }; then @@ -10,6 +9,9 @@ if [ "$__major" -lt 4 ] || { [ "$__major" -eq 4 ] && [ "$__minor" -lt 3 ]; }; th exit 1 fi +set -euo pipefail +shopt -s nullglob + cd "$(dirname "$0")" declare -A files @@ -233,7 +235,6 @@ generate_pac() { is_up_to_date=true files_to_be_deleted=(proxy.pac) -shopt -s nullglob for file in "$0" *.js *.txt; do if [ "$file" -nt proxy.pac ]; then is_up_to_date=false