2024-07-02 19:02:12 +00:00
|
|
|
#!/bin/bash
|
2024-07-04 16:00:50 +00:00
|
|
|
ZVERSION="0.6.0.0"
|
2024-07-08 20:59:42 +00:00
|
|
|
echo "Generate Zenith Binary Installer"
|
|
|
|
echo
|
2024-07-02 19:02:12 +00:00
|
|
|
echo "Updating installer binary files ...."
|
|
|
|
echo
|
2024-07-04 16:00:50 +00:00
|
|
|
echo "... copying zenith to zenith-"$ZVERSION"-amd64/bin folder"
|
2024-07-12 17:32:59 +00:00
|
|
|
cp "../dist-newstyle/build/x86_64-linux/ghc-9.6.5/zenith-"$ZVERSION"/build/zenith/zenith" "zenith-"$ZVERSION"-amd64/bin/"
|
2024-07-04 16:00:50 +00:00
|
|
|
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
|
2024-07-02 19:02:12 +00:00
|
|
|
echo
|
|
|
|
echo "Done "
|
|
|
|
echo
|