Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Use deploy directory as working directory
  4. parent_path=$( cd "$(dirname "${BASH_SOURCE}")" ; pwd -P )
  5. cd "$parent_path"
  6.  
  7. # halt on any error
  8. # set -e
  9.  
  10. build() {
  11. docker build -t pomodoro-slack ..
  12. }
  13.  
  14. run() {
  15. docker run --rm -ti \
  16. -e ENV=development \
  17. -v $(pwd):/app \
  18. -w /app \
  19. -p 80:80 \
  20. pomodoro-slack "$@"
  21. }
  22.  
  23. bash() {
  24. run bash
  25. }
  26.  
  27. continue() {
  28. read -p "Press [Enter] key to continue..." key
  29. }
  30.  
  31. while :
  32. do
  33. clear
  34. echo "---------------------------------"
  35. echo " M A I N - M E N U"
  36. echo "---------------------------------"
  37. echo '1. build'
  38. echo '2. bash'
  39. echo '0. exit'
  40. echo "---------------------------------"
  41. read -r -p "Enter your choice: " option
  42. case ${option} in
  43. 1) build
  44. continue;;
  45. 2) bash
  46. continue;;
  47. 0) break;;
  48. esac
  49. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement