From: Simon Ruderich Date: Wed, 18 Feb 2009 19:22:43 +0000 (+0100) Subject: Add shortcuts to sync.sh X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=3c18495e89d3c0bf4dec6433c006365696e3d0cd;p=config%2Fdotfiles.git Add shortcuts to sync.sh fe for fetch, pu for push. Also improve the usage output if a wrong method was used. --- diff --git a/sync.sh b/sync.sh index a3deab5..ffd26cc 100755 --- 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