diff .bashrc @ 84:7ddb611ba0c1

add update all command
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 01 Aug 2010 22:53:04 -0700
parents 84ffa220796a
children e1ec232bd0a1
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