#!/bin/bash ZVERSION="0.6.0.0" echo "Generate Zenith Binary Installer" echo echo "Updating installer binary files ...." echo echo "... copying zenith to zenith-"$ZVERSION"-amd64/bin folder" cp "../dist-newstyle/build/x86_64-linux/ghc-9.6.5/zenith-"$ZVERSION"/build/zenith/zenith" "zenith-"$ZVERSION"-amd64/bin/" echo "... copying assets folder to zenith-"$ZVERSION"-amd64/assets folder" cp -r "../assets/" "zenith-"$ZVERSION"-amd64/" echo "... copying librustzcash_wrapper.so to zenith-"$ZVERSION"-amd64/lib folder" cp "../zcash-haskell/librustzcash-wrapper/target/x86_64-unknown-linux-gnu/debug/librustzcash_wrapper.so" "zenith-"$ZVERSION"-amd64/lib/" echo read -r -p "Do you want to create the installer package (.tar.gz)? [Y/n] " response case "$response" in [yY]) if [ -f "zenith-"$ZVERSION"-amd64.tar.gz" ]; then if [ -f "zenith-"$ZVERSION"-amd64.tar.gz.prev" ]; then rm "zenith-"$ZVERSION"-amd64.tar.gz.prev" fi echo "... previous package found, saving it as 'zenith-"$ZVERSION"-amd64.tar.gz.prev'" mv "zenith-"$ZVERSION"-amd64.tar.gz" "zenith-"$ZVERSION"-amd64.tar.gz.prev" fi echo "... creating zenith-"$ZVERSION"-amd64.tar.gz" tar czf "zenith-"$ZVERSION"-amd64.tar.gz" "zenith-"$ZVERSION"-amd64" echo "... zenith-"$ZVERSION"-amd64.tar.gz created." ;; *) echo "... installer package not created." ;; esac echo echo "Done " echo