]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
Add shortcuts to sync.sh
authorSimon Ruderich <simon@ruderich.org>
Wed, 18 Feb 2009 19:22:43 +0000 (20:22 +0100)
committerSimon Ruderich <simon@ruderich.org>
Wed, 18 Feb 2009 19:22:43 +0000 (20:22 +0100)
fe for fetch, pu for push. Also improve the usage output if a wrong method was
used.

sync.sh

diff --git a/sync.sh b/sync.sh
index a3deab5d6653a4251f9552de1e4ac9cc38c68e5c..ffd26ccc125b10e099bbc56bd4fc2c88791ae294 100755 (executable)
--- a/sync.sh
+++ b/sync.sh
@@ -6,12 +6,15 @@
 
 
 # Select the method, fetch and push is possible.
-if [ x$1 = x -o x$1 = xfetch ]; then
+if [ x$1 = x -o x$1 = xfetch -o x$1 = xfe ]; then
     method=fetch
-elif [ x$1 = xpush ]; then
+elif [ $1 = push -o $1 = pu ]; then
     method=push
 else
-    echo "Unsupported method '$1'. Only 'fetch' and 'push' is supported." >&2
+    echo "Usage: sync.sh [fetch | fe | push | pu ]"
+    echo
+    echo "fetch: Fetch from all remotes."
+    echo "psuh: Push to all remotes."
     exit 1
 fi