build: add script build_cleanlocale.sh
This commit is contained in:
@@ -22,16 +22,9 @@ fi
|
|||||||
# update locale
|
# update locale
|
||||||
info "preparing electrum-locale."
|
info "preparing electrum-locale."
|
||||||
(
|
(
|
||||||
cd "$PROJECT_ROOT"
|
"$CONTRIB/build_cleanlocale.sh"
|
||||||
git submodule update --init
|
|
||||||
|
|
||||||
LOCALE="$PROJECT_ROOT/electrum/locale/"
|
|
||||||
cd "$LOCALE"
|
|
||||||
git clean -ffxd
|
|
||||||
git reset --hard
|
|
||||||
"$CONTRIB/build_locale.sh" "$LOCALE/locale" "$LOCALE/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 -r locale/*/electrum.po
|
rm -r "$PROJECT_ROOT/electrum/locale/locale"/*/electrum.po
|
||||||
)
|
)
|
||||||
|
|
||||||
pushd "$CONTRIB_ANDROID"
|
pushd "$CONTRIB_ANDROID"
|
||||||
|
|||||||
@@ -136,16 +136,9 @@ break_legacy_easy_install
|
|||||||
|
|
||||||
info "preparing electrum-locale."
|
info "preparing electrum-locale."
|
||||||
(
|
(
|
||||||
cd "$PROJECT_ROOT"
|
"$CONTRIB/build_cleanlocale.sh"
|
||||||
git submodule update --init
|
|
||||||
|
|
||||||
LOCALE="$PROJECT_ROOT/electrum/locale/"
|
|
||||||
cd "$LOCALE"
|
|
||||||
git clean -ffxd
|
|
||||||
git reset --hard
|
|
||||||
"$CONTRIB/build_locale.sh" "$LOCALE/locale" "$LOCALE/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 -r locale/*/electrum.po
|
rm -r "$PROJECT_ROOT/electrum/locale/locale"/*/electrum.po
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,18 +26,12 @@ fi
|
|||||||
|
|
||||||
info "preparing electrum-locale."
|
info "preparing electrum-locale."
|
||||||
(
|
(
|
||||||
cd "$PROJECT_ROOT"
|
"$CONTRIB/build_cleanlocale.sh"
|
||||||
git submodule update --init
|
|
||||||
|
|
||||||
LOCALE="$PROJECT_ROOT/electrum/locale/"
|
|
||||||
cd "$LOCALE"
|
|
||||||
git clean -ffxd
|
|
||||||
git reset --hard
|
|
||||||
# By default, include both source (.po) and compiled (.mo) locale files in the source dist.
|
# By default, include both source (.po) and compiled (.mo) locale files in the source dist.
|
||||||
# Set option OMIT_UNCLEAN_FILES=1 to exclude the compiled locale files
|
# Set option OMIT_UNCLEAN_FILES=1 to exclude the compiled locale files
|
||||||
# see https://askubuntu.com/a/144139 (also see MANIFEST.in)
|
# see https://askubuntu.com/a/144139 (also see MANIFEST.in)
|
||||||
if ([ "$OMIT_UNCLEAN_FILES" != 1 ]); then
|
if ([ "$OMIT_UNCLEAN_FILES" = 1 ]); then
|
||||||
"$CONTRIB/build_locale.sh" "$LOCALE/locale" "$LOCALE/locale"
|
rm -r "$PROJECT_ROOT/electrum/locale/locale"/*/LC_MESSAGES/electrum.mo
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -18,16 +18,9 @@ info "Last commit: $VERSION"
|
|||||||
|
|
||||||
info "preparing electrum-locale."
|
info "preparing electrum-locale."
|
||||||
(
|
(
|
||||||
cd "$PROJECT_ROOT"
|
"$CONTRIB/build_cleanlocale.sh"
|
||||||
git submodule update --init
|
|
||||||
|
|
||||||
LOCALE="$PROJECT_ROOT/electrum/locale/"
|
|
||||||
cd "$LOCALE"
|
|
||||||
git clean -ffxd
|
|
||||||
git reset --hard
|
|
||||||
"$CONTRIB/build_locale.sh" "$LOCALE/locale" "$LOCALE/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 -r locale/*/electrum.po
|
rm -r "$PROJECT_ROOT/electrum/locale/locale"/*/electrum.po
|
||||||
)
|
)
|
||||||
|
|
||||||
find -exec touch -h -d '2000-11-11T11:11:11+00:00' {} +
|
find -exec touch -h -d '2000-11-11T11:11:11+00:00' {} +
|
||||||
|
|||||||
15
contrib/build_cleanlocale.sh
Executable file
15
contrib/build_cleanlocale.sh
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
CONTRIB="$(dirname "$(readlink -e "$0")")"
|
||||||
|
PROJECT_ROOT="$CONTRIB"/..
|
||||||
|
|
||||||
|
cd "$PROJECT_ROOT"
|
||||||
|
git submodule update --init
|
||||||
|
|
||||||
|
LOCALE="$PROJECT_ROOT/electrum/locale/"
|
||||||
|
cd "$LOCALE"
|
||||||
|
git clean -ffxd
|
||||||
|
git reset --hard
|
||||||
|
"$CONTRIB/build_locale.sh" "$LOCALE/locale" "$LOCALE/locale"
|
||||||
@@ -128,23 +128,15 @@ pyinstaller --version
|
|||||||
|
|
||||||
rm -rf ./dist
|
rm -rf ./dist
|
||||||
|
|
||||||
if ! which msgfmt > /dev/null 2>&1; then
|
|
||||||
brew install gettext
|
|
||||||
brew link --force gettext
|
|
||||||
fi
|
|
||||||
|
|
||||||
info "preparing electrum-locale."
|
info "preparing electrum-locale."
|
||||||
(
|
(
|
||||||
cd "$PROJECT_ROOT"
|
if ! which msgfmt > /dev/null 2>&1; then
|
||||||
git submodule update --init
|
brew install gettext
|
||||||
|
brew link --force gettext
|
||||||
LOCALE="$PROJECT_ROOT/electrum/locale/"
|
fi
|
||||||
cd "$LOCALE"
|
"$CONTRIB/build_cleanlocale.sh"
|
||||||
git clean -ffxd
|
|
||||||
git reset --hard
|
|
||||||
"$CONTRIB/build_locale.sh" "$LOCALE/locale" "$LOCALE/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 -r locale/*/electrum.po
|
rm -r "$PROJECT_ROOT/electrum/locale/locale"/*/electrum.po
|
||||||
) || fail "failed generating locale"
|
) || fail "failed generating locale"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user