changeset 84:7ddb611ba0c1

add update all command
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 01 Aug 2010 22:53:04 -0700
parents 4f49c0caa801
children 88f57c1d3546
files .bashrc
diffstat 1 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/.bashrc	Mon Jul 26 19:12:47 2010 -0700
+++ b/.bashrc	Sun Aug 01 22:53:04 2010 -0700
@@ -41,7 +41,8 @@
 export PYTHONPATH=~/python:$PYTHONPATH
 
 
-# functions
+### functions
+
 cdwin() {
 # change directory to a window's location using its title
     DIR=$(xwininfo | dictify.py xwininfo | awk '{ print $NF }' | sed 's/"//g')
@@ -259,6 +260,19 @@
 grep '^+++ ' $@ | sed 's/+++ b\///'
 }
 
+hg-update-all() { 
+for i in *; 
+do
+    if [ -e $i/.hg ]
+    then
+        cd $i
+        hg pull
+        hg update
+        cd -
+    fi
+done
+}
+
 ### include overrides for commands
 source ~/.bash_overrides