clones.sh 390 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. defaultPath=./make/clone-repo.sh
  3. defaultRepo=https://github.com/leachim6/hello-world.git
  4. src=plugins
  5. clonefile=clone-repos.sh
  6. clonepath=${src}/${clonefile}
  7. username=${1:-""}
  8. if [ -e ${clonepath} ] ; then
  9. sh ${clonepath} ${username}
  10. else
  11. if [ -e ${defaultPath} ] ; then
  12. ${defaultPath} ${defaultRepo}
  13. else
  14. echo "No such file: ${defaultPath}"
  15. fi
  16. fi