Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. set -e
  4. set -o
  5.  
  6.  
  7. YES="1"
  8. NO="0"
  9. EMPTY=""
  10. FORCE_DB_INSTALL=${NO}
  11. BRANCH=${EMPTY}
  12.  
  13. while getopts "fb:" option; do
  14. case ${option} in
  15. f)
  16. FORCE_DB_INSTALL=${YES}
  17. ;;
  18. b)
  19. BRANCH=${OPTARG}
  20. ;;
  21. \?)
  22. echo "Invalid option -${OPTARG}." 1>&2
  23. exit 1
  24. ;;
  25. :)
  26. echo "Invalid option: ${OPTARG} requires an argument." 1>&2
  27. exit 1
  28. ;;
  29. esac
  30. done
  31. shift $((OPTIND -1))
  32.  
  33. echo ${FORCE_DB_INSTALL}
  34. echo ${BRANCH}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement