Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/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
Add Comment
Please, Sign In to add comment