Last active
July 11, 2021 06:51
-
-
Save psychoticbeef/3b16cee0db3de63be5ccf1954c182953 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 -e | |
# user editable | |
local_dest=VenturePlan | |
wow="/mnt/c/Program Files (x86)/World of Warcraft/_retail_/Interface/AddOns" | |
# program editable | |
addon_whitelist=Addon | |
source=https://github.com/Gaboros/VenturePlan.git | |
addon_name=VenturePlan | |
pull() { | |
git pull origin master | |
} | |
checkout() { | |
mkdir "$local_dest" | |
cd "$local_dest" | |
git init | |
git remote add -f origin "$source" | |
git config core.sparseCheckout true | |
echo "$addon_whitelist" > .git/info/sparse-checkout | |
} | |
if [ ! -d "$wow" ] ; then | |
echo "Directory \"$wow\" not found. Please configure." | |
exit 1 | |
fi | |
if [ ! -d "$local_dest"/.git ] ; then | |
echo "Destination $local_dest does not exist. Pulling..." | |
checkout | |
else | |
cd "$local_dest" | |
fi | |
if [ ! -d "$wow/$addon_name" ] ; then | |
mkdir "$wow/$addon_name" | |
fi | |
echo "Updating" | |
pull | |
echo "Synchronizing" | |
rsync --delete -r "$addon_whitelist/" "$wow/$addon_name/" | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment