Update build.sh

This commit is contained in:
Chai Feng 2024-10-08 10:08:09 +08:00 committed by GitHub
parent 04bdd59395
commit f4c7d5ff64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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