Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #/usr/bin/sh
- cd download # created beforehand
- read -p "Input Exodus.io Download Link: " dn1
- read -p "Confirm: " dn2
- if [ "$dn1" !~= "https://downloads.exodus.io/releases/exodus-linux-x64-.*.zip" ]; then
- printf "Expencted https://downloads.exodus.io/releases/exodus-linux-x64-*.zip\nGot input %s\n" $dn1
- exit 1
- fi
- if [ $dn1 == $dn2 ]; then
- printf "Match (%s)\n" $dn1
- else
- printf "Mismath\n%s\n%s\n" $dn1 $dn2
- exit 2
- fi
- echo "Downloading..."
- wget "$dn1"
- if [[ $? -eq 0 ]]; then
- echo "Success."
- else
- echo "Download failed."
- exit 3
- fi
- echo "Unzipping"
- unzip *.zip
- if [[ $? -eq 0 ]]; then
- echo "Success."
- rm -f *.zip
- else
- echo "Unzip failed."
- exit 4
- fi
- rm -rf ../Exodus-linux-x64
- mv -fuv ./Exodus-linux-x64 ..
Add Comment
Please, Sign In to add comment