#!/bin/bash set -e CONTRIB_SDIST="$(dirname "$(readlink -e "$0")")" CONTRIB="$CONTRIB_SDIST"/../.. ROOT_FOLDER="$CONTRIB"/.. PACKAGES="$ROOT_FOLDER"/packages/ LOCALE="$ROOT_FOLDER"/electrum/locale/ if [ ! -d "$PACKAGES" ]; then echo "Run make_packages first!" exit 1 fi git submodule update --init ( rm -rf "$LOCALE" cd "$CONTRIB/deterministic-build/electrum-locale/" if ! which msgfmt > /dev/null 2>&1; then echo "Please install gettext" exit 1 fi for i in ./locale/*; do dir="$ROOT_FOLDER"/electrum/$i/LC_MESSAGES mkdir -p $dir msgfmt --output-file=$dir/electrum.mo $i/electrum.po || true cp $i/electrum.po "$ROOT_FOLDER"/electrum/$i/electrum.po done ) ( cd "$ROOT_FOLDER" echo "'git clean -fd' would delete the following files: >>>" git clean -fd --dry-run echo "<<<" # we could build the kivy atlas potentially? #(cd electrum/gui/kivy/; make theming) || echo "building kivy atlas failed! skipping." find -exec touch -h -d '2000-11-11T11:11:11+00:00' {} + # note: .zip sdists would not be reproducible due to https://bugs.python.org/issue40963 TZ=UTC faketime -f '2000-11-11 11:11:11' python3 setup.py --quiet sdist --format=gztar )