Rene Vergara A
b675854c49
Scripts to create the installer and the docker image distribution packages included
47 lines
No EOL
1.7 KiB
Bash
Executable file
47 lines
No EOL
1.7 KiB
Bash
Executable file
#!/bin/bash
|
|
ZVERSION="0.6.0.0"
|
|
echo
|
|
echo "Updating docker binary files ...."
|
|
echo
|
|
echo "... copying zenith to ./bin folder"
|
|
cp "../dist-newstyle/build/x86_64-linux/ghc-9.4.8/zenith-0.5.3.0/build/zenith/zenith" "bin/"
|
|
echo "... copying assets folder to ./assets folder"
|
|
cp -r "../assets/" .
|
|
echo "... copying librustzcash_wrapper.so to ./lib folder"
|
|
cp "../zcash-haskell/librustzcash-wrapper/target/x86_64-unknown-linux-gnu/debug/librustzcash_wrapper.so" "lib/"
|
|
echo
|
|
|
|
read -r -p "Do you want to create the docker image? [Y/n] " response
|
|
case "$response" in
|
|
[yY])
|
|
if docker image ls | grep -q "zenith-docker" ; then
|
|
echo "... removing previous docker image"
|
|
docker rmi -f "zenith-docker:"$ZVERSION
|
|
fi
|
|
echo "... creating zenith-docker:"$ZVERSION" image"
|
|
docker build -t "zenith-docker:"$ZVERSION .
|
|
echo "... docker image zenith-docker:"$ZVERSION" created."
|
|
echo "... exporting zenith-docker:"$ZVERSION" as .tar file"
|
|
docker save -o zenith-docker_$ZVERSION.tar zenith-docker:$ZVERSION
|
|
echo "... zenith-docker:"$ZVERSION" image ready."
|
|
echo "... creating distribution package file "
|
|
if [ -d zenith-docker_$ZVERSION ]; then
|
|
rm -rf zenith-docker_$ZVERSION
|
|
fi
|
|
mkdir zenith-docker_$ZVERSION
|
|
cp setup_docker zenith-docker_$ZVERSION/
|
|
cp -r cfg zenith-docker_$ZVERSION/
|
|
mv zenith-docker_$ZVERSION.tar zenith-docker_$ZVERSION/
|
|
if [ -f zenith-docker_$ZVERSION.7z ]; then
|
|
rm zenith-docker_$ZVERSION.7z
|
|
fi
|
|
7z a zenith-docker_$ZVERSION.7z zenith-docker_$ZVERSION
|
|
echo "... distribution file created. (zenith-docker_$ZVERSION.tar.gz)"
|
|
;;
|
|
*)
|
|
echo "... docker image not created."
|
|
;;
|
|
esac
|
|
echo
|
|
echo "Done "
|
|
echo |