build: use build-locale.sh in all build scripts
This commit is contained in:
@@ -25,17 +25,10 @@ popd
|
||||
# update locale
|
||||
info "preparing electrum-locale."
|
||||
(
|
||||
cd "$CONTRIB"/deterministic-build/electrum-locale
|
||||
if ! which msgfmt > /dev/null 2>&1; then
|
||||
fail "Please install gettext"
|
||||
fi
|
||||
LOCALE="$PROJECT_ROOT/electrum/locale/"
|
||||
# we want the binary to have only compiled (.mo) locale files; not source (.po) files
|
||||
rm -rf "$PROJECT_ROOT/electrum/locale/"
|
||||
for i in ./locale/*; do
|
||||
dir="$PROJECT_ROOT/electrum/$i/LC_MESSAGES"
|
||||
mkdir -p $dir
|
||||
msgfmt --output-file="$dir/electrum.mo" "$i/electrum.po" || true
|
||||
done
|
||||
rm -rf "$LOCALE"
|
||||
"$CONTRIB/build_locale.sh" "$CONTRIB/deterministic-build/electrum-locale/locale/" "$LOCALE"
|
||||
)
|
||||
|
||||
pushd "$CONTRIB_ANDROID"
|
||||
|
||||
@@ -93,18 +93,10 @@ info "preparing electrum-locale."
|
||||
cd "$PROJECT_ROOT"
|
||||
git submodule update --init
|
||||
|
||||
pushd "$CONTRIB"/deterministic-build/electrum-locale
|
||||
if ! which msgfmt > /dev/null 2>&1; then
|
||||
fail "Please install gettext"
|
||||
fi
|
||||
LOCALE="$PROJECT_ROOT/electrum/locale/"
|
||||
# we want the binary to have only compiled (.mo) locale files; not source (.po) files
|
||||
rm -rf "$PROJECT_ROOT/electrum/locale/"
|
||||
for i in ./locale/*; do
|
||||
dir="$PROJECT_ROOT/electrum/$i/LC_MESSAGES"
|
||||
mkdir -p $dir
|
||||
msgfmt --output-file="$dir/electrum.mo" "$i/electrum.po" || true
|
||||
done
|
||||
popd
|
||||
rm -rf "$LOCALE"
|
||||
"$CONTRIB/build_locale.sh" "$CONTRIB/deterministic-build/electrum-locale/locale/" "$LOCALE"
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ git submodule update --init
|
||||
rm -rf "$LOCALE"
|
||||
cp -r "$CONTRIB/deterministic-build/electrum-locale/locale/" "$LOCALE/"
|
||||
if ([ "$OMIT_UNCLEAN_FILES" != 1 ]); then
|
||||
"$CONTRIB/build_locale.sh" "$LOCALE"
|
||||
"$CONTRIB/build_locale.sh" "$LOCALE" "$LOCALE"
|
||||
fi
|
||||
)
|
||||
|
||||
|
||||
@@ -18,18 +18,10 @@ info "Last commit: $VERSION"
|
||||
# Load electrum-locale for this release
|
||||
git submodule update --init
|
||||
|
||||
pushd ./contrib/deterministic-build/electrum-locale
|
||||
if ! which msgfmt > /dev/null 2>&1; then
|
||||
fail "Please install gettext"
|
||||
fi
|
||||
LOCALE="$WINEPREFIX/drive_c/electrum/electrum/locale/"
|
||||
# we want the binary to have only compiled (.mo) locale files; not source (.po) files
|
||||
rm -rf "$WINEPREFIX/drive_c/electrum/electrum/locale/"
|
||||
for i in ./locale/*; do
|
||||
dir="$WINEPREFIX/drive_c/electrum/electrum/$i/LC_MESSAGES"
|
||||
mkdir -p $dir
|
||||
msgfmt --output-file="$dir/electrum.mo" "$i/electrum.po" || true
|
||||
done
|
||||
popd
|
||||
rm -rf "$LOCALE"
|
||||
"$CONTRIB/build_locale.sh" "$CONTRIB/deterministic-build/electrum-locale/locale/" "$LOCALE"
|
||||
|
||||
find -exec touch -h -d '2000-11-11T11:11:11+00:00' {} +
|
||||
popd
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -d "$1" ]; then
|
||||
echo "usage: $0 path/to/locale"
|
||||
set -e
|
||||
|
||||
if [[ ! -d "$1" || -z "$2" ]]; then
|
||||
echo "usage: $0 locale_source_dir locale_dest_dir"
|
||||
echo " The dirs can match, to build in place."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -10,7 +13,11 @@ if ! which msgfmt > /dev/null 2>&1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for i in "$1/"*; do
|
||||
mkdir -p "$i/LC_MESSAGES"
|
||||
(msgfmt --output-file="$i/LC_MESSAGES/electrum.mo" "$i/electrum.po" || true)
|
||||
cd "$1"
|
||||
mkdir -p "$2"
|
||||
|
||||
for i in *; do
|
||||
dir="$2/$i/LC_MESSAGES"
|
||||
mkdir -p "$dir"
|
||||
(msgfmt --output-file="$dir/electrum.mo" "$i/electrum.po" || true)
|
||||
done
|
||||
|
||||
@@ -175,14 +175,10 @@ info "generating locale"
|
||||
brew install gettext
|
||||
brew link --force gettext
|
||||
fi
|
||||
cd "$CONTRIB"/deterministic-build/electrum-locale
|
||||
LOCALE="$PROJECT_ROOT/electrum/locale/"
|
||||
# we want the binary to have only compiled (.mo) locale files; not source (.po) files
|
||||
rm -rf "$PROJECT_ROOT/electrum/locale/"
|
||||
for i in ./locale/*; do
|
||||
dir="$PROJECT_ROOT/electrum/$i/LC_MESSAGES"
|
||||
mkdir -p "$dir"
|
||||
msgfmt --output-file="$dir/electrum.mo" "$i/electrum.po" || true
|
||||
done
|
||||
rm -rf "$LOCALE"
|
||||
"$CONTRIB/build_locale.sh" "$CONTRIB/deterministic-build/electrum-locale/locale/" "$LOCALE"
|
||||
) || fail "failed generating locale"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user