]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
Merge remote branch 'asp/master'
authorSimon Ruderich <simon@ruderich.org>
Fri, 3 Dec 2010 11:48:25 +0000 (12:48 +0100)
committerSimon Ruderich <simon@ruderich.org>
Fri, 3 Dec 2010 11:48:25 +0000 (12:48 +0100)
Conflicts:
bin/git-update.sh

bin/git-update-all.sh
bin/git-update.sh
zsh/env

index b2ae8f8026660b481aeda5d925933ccab5b2e487..45ef0fa617e9189b86c920b7516032878c67d176 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 # Run git-update.sh for all git repositories in this directory.
+#
+# All arguments are passed to git-update.sh.
 
 
-find . -name .git -type d -exec git-update.sh {} \; | less
+find . -name .git -type d -exec git-update.sh "$@" {} \; | less
index e9c0abad5b79e4e983d862b58e0fdd29b493f7e2..de71bec0dc304c78b3041bd13ae85228642f05a1 100755 (executable)
@@ -3,23 +3,33 @@
 # Push current commits to all remotes and fetch from all remotes. Then display
 # unmerged commits and changes in the repositories.
 #
+# If --local is given as option, no fetching/pushing is performed.
+#
 # If an argument is given cd to this directory before running the commands.
 #
 # Very useful to sync multiple remotes.
 
 
+LOCAL=
+if [ x$1 = x--local ];then
+    LOCAL=1
+    shift
+fi
+
 if [ x$1 != x ]; then
     echo $1
     cd "$1"
 fi
 
-# Get all remote changes.
-git remote update 2>&1 | grep -v Fetching
-# Push all local changes to remote(s).
-for remote in `git remote`; do
-    git push $remote 2>&1 | grep -v 'Everything up-to-date'
-    git push --tags $remote 2>&1 | grep -v 'Everything up-to-date'
-done
+if [ x$LOCAL = x ]; then
+    # Get all remote changes.
+    git remote update 2>&1 | grep -v Fetching
+    # Push all local changes to remote(s).
+    for remote in `git remote`; do
+        git push $remote 2>&1 | grep -v 'Everything up-to-date'
+        git push --tags $remote 2>&1 | grep -v 'Everything up-to-date'
+    done
+fi
 # Show unmerged changes.
 git branch -rv --color --no-merged
 # Show uncommitted changes.
diff --git a/zsh/env b/zsh/env
index 81df0bd32facb7a00073eb2d5c03dc93dd7f8cb4..2eced63afa66170440ccbd1b9ac8137331d62eb2 100644 (file)
--- a/zsh/env
+++ b/zsh/env
@@ -22,6 +22,12 @@ export LESS_TERMCAP_us=$'\e[04;1;33m'
 export LESS_TERMCAP_ue=$'\e[0m'
 
 
+# Setup lesspipe to view multiple file-types (like .gz, .zip, etc.) with less.
+# Useful in combination with the "p" alias. Taken from Debian's default bash
+# files. Thanks.
+[[ -x /usr/bin/lesspipe ]] && eval "$(SHELL=/bin/sh lesspipe)"
+
+
 source_config ~/.zsh/env.local
 
 source_debug ". ~/.zsh/env (done)"