build: Remove hardcoded Homebrew path for solaar in macOS script
The `create-macos-app.sh` script previously defaulted to a hardcoded Homebrew path for the `solaar` executable. This change removes the specific path, defaulting instead to `solaar`. This modification makes the script more flexible and robust. It allows the system's `PATH` to resolve the location of the `solaar` binary, accommodating various installation methods beyond a fixed Homebrew directory. The explicit check for the executable's existence is also removed, as the script will now rely on the command being available in the shell's environment, which is a more standard approach.
This commit is contained in:
parent
925cf14ae2
commit
c1a9332490
|
|
@ -3,14 +3,9 @@
|
|||
set -euo pipefail
|
||||
|
||||
APP_ROOT=${1:-/Applications/Solaar.app}
|
||||
SOLAR_PATH=${SOLAR_PATH:-/opt/homebrew/bin/solaar}
|
||||
SOLAR_PATH=${SOLAR_PATH:-solaar}
|
||||
ICON_SOURCE=${ICON_SOURCE:-share/solaar/icons/solaar.svg}
|
||||
|
||||
if [[ ! -x "${SOLAR_PATH}" ]]; then
|
||||
echo "Error: Unable to execute ${SOLAR_PATH}. Set SOLAR_PATH to the solaar binary." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "${APP_ROOT}" in
|
||||
""|"/"|".")
|
||||
echo "Error: Refusing to create app bundle at unsafe location: \"${APP_ROOT}\"" >&2
|
||||
|
|
|
|||
Loading…
Reference in New Issue