Merge pull request #6376 from sellout/fetch-params-macos

Support Bash 3.2 in fetch-params.sh
This commit is contained in:
Kris Nuttycombe 2023-01-27 11:32:20 -07:00 committed by GitHub
commit a4e6efa3ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -5,10 +5,15 @@ set -eu
SCRIPT_NAME=$(basename $0)
[[ -v XDG_CACHE_HOME ]] || XDG_CACHE_HOME="${HOME}/.cache"
if [[ -z "${XDG_CACHE_HOME:+x}" ]]; then
XDG_CACHE_HOME="${HOME}/.cache"
fi
# We dont care too much about most of the properties of `XDG_RUNTIME_DIR` in
# this script, so we just fall back to `XDG_CACHE_HOME`.
[[ -v XDG_RUNTIME_DIR ]] || XDG_RUNTIME_DIR="${XDG_CACHE_HOME}"
if [[ -z "${XDG_RUNTIME_DIR:+x}" ]]; then
XDG_RUNTIME_DIR="${XDG_CACHE_HOME}";
fi
uname_S=$(uname -s 2>/dev/null || echo not)