Created
May 23, 2011 20:31
-
-
Save clsn/987534 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ $# -gt 0 ] | |
then DIR="$1" | |
else DIR="." | |
fi | |
if [ -d "$DIR/.hg" ] | |
then echo hg status "$DIR" | |
hg status "$DIR" | |
elif [ -d "$DIR/.svn" ] | |
then echo "svn status $DIR" | |
svn status "$DIR" | |
elif [ -d "$DIR/.git" ] | |
then echo "git --git-dir=\"$DIR/.git\" --work-tree=\"$DIR\" status" | |
git --git-dir="$DIR/.git" --work-tree="$DIR" status | |
elif [ -d "$DIR/.bzr" ] | |
then echo "bzr status $DIR" | |
bzr status "$DIR" | |
else | |
echo "Unknown VCS (if any)" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment