Skip to content

Commit

Permalink
Add ability to build and exit
Browse files Browse the repository at this point in the history
  • Loading branch information
stack committed Sep 21, 2023
1 parent 0f3b10c commit aecc466
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions grasshopper
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ WORKBENCH="/root/workbench"
usage() {
printf "Usage: %s [OPTIONS]\n" "${0}"
printf "OPTIONS:\n"
printf " -b Rebuild the container, then run (this can take 20 minutes)\n"
printf " -b Just build the container and exit (this can take 21 minutes)\n"
printf " -d Build the container before running (this can take 30 minutes)\n"
printf " -h Print this message and exit\n"
printf " -k Kill any containers that exist before running\n"
printf "\n\n"
Expand Down Expand Up @@ -185,12 +186,16 @@ main() {
secret
exit 0
fi
if [[ "${ARG}" == *"b"* ]]; then
docker_build
exit 0
fi

# Kill and Build
if [[ "${ARG}" == *"k"* ]]; then
docker_kill
fi
if [[ "${ARG}" == *"b"* ]]; then
if [[ "${ARG}" == *"d"* ]]; then
docker_build
fi
fi
Expand Down

0 comments on commit aecc466

Please sign in to comment.