1
0
Files
electrum/contrib/locale/build_cleanlocale.sh
SomberNight 3a5815d854 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.
2025-05-05 18:31:07 +00:00

17 lines
358 B
Bash
Executable File

#!/bin/bash
set -e
CONTRIB_LOCALE="$(dirname "$(realpath "$0" 2> /dev/null || grealpath "$0")")"
CONTRIB="$CONTRIB_LOCALE"/..
PROJECT_ROOT="$CONTRIB"/..
cd "$PROJECT_ROOT"
git submodule update --init
LOCALE="$PROJECT_ROOT/electrum/locale/"
cd "$LOCALE"
git clean -ffxd
git reset --hard
"$CONTRIB_LOCALE/build_locale.sh" "$LOCALE/locale" "$LOCALE/locale"