Skip to content

Instantly share code, notes, and snippets.

@dscho
Created August 19, 2010 17:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dscho/538377 to your computer and use it in GitHub Desktop.
Save dscho/538377 to your computer and use it in GitHub Desktop.
#!/bin/sh
cd /usr/lib/fiji
url=http://pacific.mpi-cbg.de/update
curl $url/current.txt |
while read package date has
do
case $package in
fiji-linux)
curl $url/$package-$date > fiji
;;
fiji-*|plugins/Fiji_Updater.jar)
;; # do not get other launchers or the Fiji Updater
*)
dir=$(dirname $package) &&
if test ! -d $dir
then
mkdir -p $dir # make sure directory exists
fi &&
curl $url/$package-$date > $package
;;
esac || break
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment