From f40931bcae72abbd0ef397595d386f390b02f5f2 Mon Sep 17 00:00:00 2001 From: JensDiemer Date: Fri, 27 Aug 2010 18:00:19 +0200 Subject: [PATCH] add update script --- update.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 update.sh diff --git a/update.sh b/update.sh new file mode 100755 index 000000000..dccfd58e4 --- /dev/null +++ b/update.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +echo + +function verbose_eval { + echo + echo _____________________________________________________________________ + echo $* + echo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + eval $* + echo --------------------------------------------------------------------- + echo +} + +if [ -e .git ]; +then + echo ".git directory found" + verbose_eval git pull origin master +elif [ -e .svn ]; +then + echo ".svn directory found" + verbose_eval svn update +else + echo "no .git or .svn directory found. Can't update" +fi \ No newline at end of file