Guest User

Untitled

a guest
May 22nd, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #!/bin/sh
  2. if [ $# -gt 0 ]
  3. then DIR="$1"
  4. else DIR="."
  5. fi
  6.  
  7. if [ -d "$DIR/.hg" ]
  8. then echo hg status "$DIR"
  9. hg status "$DIR"
  10. elif [ -d "$DIR/.svn" ]
  11. then echo "svn status $DIR"
  12. svn status "$DIR"
  13. elif [ -d "$DIR/.git" ]
  14. then echo "git --git-dir=\"$DIR/.git\" --work-tree=\"$DIR\" status"
  15. git --git-dir="$DIR/.git" --work-tree="$DIR" status
  16. elif [ -d "$DIR/.bzr" ]
  17. then echo "bzr status $DIR"
  18. bzr status "$DIR"
  19. else
  20. echo "Unknown VCS (if any)"
  21. fi
Add Comment
Please, Sign In to add comment