From 3a5815d8548b7fe0318de4f7c489a896bebe2f61 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Mon, 5 May 2025 18:31:07 +0000 Subject: [PATCH] build: fix locale/build_cleanlocale.sh for macos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- contrib/locale/build_cleanlocale.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/locale/build_cleanlocale.sh b/contrib/locale/build_cleanlocale.sh index 4d3c0e621..239df168a 100755 --- a/contrib/locale/build_cleanlocale.sh +++ b/contrib/locale/build_cleanlocale.sh @@ -2,7 +2,7 @@ set -e -CONTRIB_LOCALE="$(dirname "$(readlink -e "$0")")" +CONTRIB_LOCALE="$(dirname "$(realpath "$0" 2> /dev/null || grealpath "$0")")" CONTRIB="$CONTRIB_LOCALE"/.. PROJECT_ROOT="$CONTRIB"/..