1
0

build: fix locale/build_cleanlocale.sh for macos

fixes https://github.com/spesmilo/electrum/pull/9726/files#r2057787097 :
> The version of readlink installed on macOS does not support the -e flag:
> ```
> 💬 INFO:  preparing electrum-locale.
> readlink: illegal option -- e
> usage: readlink [-fn] [file ...]
> ```
>
> On a mac you can install a version of readlink that argbash expects:
> Using homebrew, `brew install coreutils` will install `greadlink` which supports the `-e` flag.

I don't think we actually need to resolve symlinks here.
There are already some examples of similar usage with realpath vs grealpath. Let's just do that.
This commit is contained in:
SomberNight
2025-05-05 18:31:07 +00:00
parent e41cefae1a
commit 3a5815d854

View File

@@ -2,7 +2,7 @@
set -e set -e
CONTRIB_LOCALE="$(dirname "$(readlink -e "$0")")" CONTRIB_LOCALE="$(dirname "$(realpath "$0" 2> /dev/null || grealpath "$0")")"
CONTRIB="$CONTRIB_LOCALE"/.. CONTRIB="$CONTRIB_LOCALE"/..
PROJECT_ROOT="$CONTRIB"/.. PROJECT_ROOT="$CONTRIB"/..