vcs-name 195 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. for x in . .. ../..
  3. do
  4. if [ -d "$x/.git" ]
  5. then
  6. echo "git"
  7. exit 0
  8. fi
  9. if [ -d "$x/.hg" ]
  10. then
  11. echo "hg"
  12. exit 0
  13. fi
  14. if [ -d "$x/.bzr" ]
  15. then
  16. echo "bzr"
  17. exit 0
  18. fi
  19. done
  20. echo "none"