title: Bash Script to Deploy
body: <p>I have a script that deploys to either firebase or heroku. At the end of the script, if I fat finger an extra key or misspell heroku or firebase, I want the script to prompt me to input the desired host and run the script again from the top with my desired input. I tried putting a while loop outside a case statement. My hope was that when the script reaches the final <code>*)</code> it will prompt me to input the desired host, start the script from the top and deploy to the desired host.</p>
  
  <p>Being fairly new to scripting, I'm not 100% sure this is how/the best way to write it, but when I run the script as <code>deploy heroku</code> or <code>deploy firebase</code> with the below code, literally, nothing happens on the terminal. I've tried quotes around <code>"$?"</code> and moved the <code>exit 1</code> around, but still nothing. Any direction would be greatly appreciated. Also, I run this script in terminal by calling </p>
  
  <p><code>deploy &lt;placetodeploy&gt;</code></p>
  
  <pre><code>#!/bin/bash
  
   HOST=$1
  
   while [ $? -gt 0 ]; do
     case "$HOST" in
       heroku)
        git push heroku master
        ;;
      firebase)
        firebase deploy
        ;;
      *)
        read -p "You can only choose between Heroku and Firebase. " HOST; exit 1                                                           
        ;;
     esac
   done
  </code></pre>