Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 89ee02bc46
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 29 lines (24 sloc) 0.64 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
#!/bin/bash

SRC_DIR="$HOME/src"
GOGET_GH="^$HOME/src/github.com"
GOGET_GC="^$HOME/src/code.google.com"
GIT_REPOS=$(find $SRC_DIR -name ".git" | xargs -n1 dirname | grep -v $GOGET_GH | grep -v $GOGET_GC | grep -v "es-nodes" )
HG_REPOS=$( find $SRC_DIR -name ".hg" | xargs -n1 dirname | grep -v $GOGET_GH | grep -v $GOGET_GC | grep -v "es-nodes" )

git_dirty() { [[ `git status --short | wc -l` -gt 0 ]] ; }
hg_dirty() { [[ `hg status | wc -l` -gt 0 ]] ; }

for R in $GIT_REPOS ; do
cd $R
if git_dirty ; then
pwd
git status --short
echo
fi
done

for R in $HG_REPOS ; do
cd $R
if hg_dirty ; then
pwd
hg status
echo
fi
done
Something went wrong with that request. Please try again.