Skip to content

Instantly share code, notes, and snippets.

@TonHabraken
Last active January 1, 2016 05:59
Show Gist options
  • Save TonHabraken/8102525 to your computer and use it in GitHub Desktop.
Save TonHabraken/8102525 to your computer and use it in GitHub Desktop.
Script which can be used to automatically update your LOGIK Matchbox shader set. Save it in /home/ for example and add to /etc/crontab for automation. Example of my crontab entry, it updates the shaders every night: 30 2 * * * root sh /home/update-matchbox.sh >/home/update-matchbox.log
#Script to update your MATCHBOX LOGIK shaders.
#Change MBDIR & BACKUPFILENAME to your needs!
#Copy this into a yourscript.sh .. and sh yourscript.sh to execute .. or add to /etc/crontab to automate it..
HOST=$(hostname)
DATE=$(date +%y_%m_%d)
MBDIR="[YOUR-LOGIK-SHADER-LOCATION]"
BACKUPFILENAME="[/YOUR-BACKUP-FILE-LOCATION]/LOGIK-BACKUP-"$DATE".tar.gz"
# Some examples:
# MBDIR="/SLEDGEHAMMER/LIBRARY/_FLAME/MATCHBOX-PLUGINS/LOGIK_SHADERS"
# BACKUPFILENAME="/SLEDGEHAMMER/LIBRARY/_FLAME/MATCHBOX-PLUGINS/LOGIK-BACKUP-"$DATE".tar.gz"
echo starting backup of LogikMatchboxShaders process on $DATE at $HOST
tar -czvf $BACKUPFILENAME $MBDIR
echo Done!
echo Starting update Logik Shaders set!
curl http://logik-matchbook.org/MatchboxShaderCollection.tgz | tar xfz -; /bin/cp -fr shaders/* "$MBDIR"
echo Done! Now go and show off to your clients!
@julik
Copy link

julik commented Dec 23, 2013

Cool stuff! Backup is not strictly necessary since you can always grab older shader versions from the site...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment