electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

make_tgz (1258B)


      1 #!/bin/bash
      2 
      3 set -e
      4 
      5 CONTRIB_SDIST="$(dirname "$(readlink -e "$0")")"
      6 CONTRIB="$CONTRIB_SDIST"/../..
      7 ROOT_FOLDER="$CONTRIB"/..
      8 PACKAGES="$ROOT_FOLDER"/packages/
      9 LOCALE="$ROOT_FOLDER"/electrum/locale/
     10 
     11 if [ ! -d "$PACKAGES" ]; then
     12   echo "Run make_packages first!"
     13   exit 1
     14 fi
     15 
     16 git submodule update --init
     17 
     18 (
     19     rm -rf "$LOCALE"
     20     cd "$CONTRIB/deterministic-build/electrum-locale/"
     21     if ! which msgfmt > /dev/null 2>&1; then
     22         echo "Please install gettext"
     23         exit 1
     24     fi
     25     for i in ./locale/*; do
     26         dir="$ROOT_FOLDER"/electrum/$i/LC_MESSAGES
     27         mkdir -p $dir
     28         msgfmt --output-file=$dir/electrum.mo $i/electrum.po || true
     29         cp $i/electrum.po "$ROOT_FOLDER"/electrum/$i/electrum.po
     30     done
     31 )
     32 
     33 (
     34     cd "$ROOT_FOLDER"
     35 
     36     echo "'git clean -fd' would delete the following files: >>>"
     37     git clean -fd --dry-run
     38     echo "<<<"
     39 
     40     # we could build the kivy atlas potentially?
     41     #(cd electrum/gui/kivy/; make theming) || echo "building kivy atlas failed! skipping."
     42 
     43     find -exec touch -h -d '2000-11-11T11:11:11+00:00' {} +
     44 
     45     # note: .zip sdists would not be reproducible due to https://bugs.python.org/issue40963
     46     TZ=UTC faketime -f '2000-11-11 11:11:11' python3 setup.py --quiet sdist --format=gztar
     47 )