From cd110f2944e9fb37cd1f21bb869d24949f6941f0 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 11 Dec 2009 00:18:29 +0100 Subject: new version, mysql binlog reset --- common/update.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 common/update.sh (limited to 'common/update.sh') diff --git a/common/update.sh b/common/update.sh new file mode 100644 index 0000000..c4f0b5f --- /dev/null +++ b/common/update.sh @@ -0,0 +1,18 @@ +# update backup scripts + +_self_update() { + pushd $(dirname $0) &>/dev/null + + git fetch origin 2>/dev/null + if [[ -n "$(git whatchanged HEAD..origin/master)" ]]; then + echo "Selfupdating backupscript..." | log + git merge origin/master | log + echo "Selfupdating done." | log + echo | log + + popd &>/dev/null + exec $0 + fi + + popd &>/dev/null +} -- cgit v1.2.3