Last active
August 29, 2015 14:13
-
-
Save billimek/9919ea296192ed08cc84 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
zpath="$HOME/tmp/TheUndermineJournal.zip" | |
ADDON_URL="https://addon.theunderminejournal.com/TheUndermineJournal.zip" | |
ADDON_DIR="/Users/jeff/Dropbox/Apps/WoW/Addons" | |
getzip=0 | |
if [ -e $zpath ]; then | |
if [ `find $zpath -mmin +500` ]; then | |
getzip=1 | |
rm $zpath | |
echo "removing $zpath" | |
fi | |
else | |
getzip=1 | |
fi | |
if [ $getzip -gt 0 ]; then | |
curl -o $zpath ${ADDON_URL} | |
unzip $zpath -d $HOME/tmp | |
rsync -a --delete $HOME/tmp/TheUndermineJournal "${ADDON_DIR}" | |
rm -rf $HOME/tmp/TheUndermineJournal | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment