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