Skip to content

Instantly share code, notes, and snippets.

@billimek
Last active August 29, 2015 14:13
Show Gist options
  • Save billimek/9919ea296192ed08cc84 to your computer and use it in GitHub Desktop.
Save billimek/9919ea296192ed08cc84 to your computer and use it in GitHub Desktop.
#!/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