Skip to content

Commit

Permalink
Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
reijoh committed Mar 22, 2024
1 parent fe5ed8f commit 9780b2f
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@

usage ()
{
printf 'Generates all parameters for the docker image\n'
printf 'build.sh: Generates all parameters for the docker image\n\n'
printf 'Usage: %s ACTION [OPTIONS] [EXTRA BUILD ARGS]\n\n' "$0"
printf 'Actions:\n'
printf '\tbuild: build and tag the image\n'
printf '\tpush: push the tags to Docker Hub\n'
printf '\tpush: push the tags to Docker Hub\n\n'
printf 'Options:\n'
printf ' -f: create freeze file\n'
printf ' -c: targeted pandoc commit, e.g. 2.9.2.1\n'
printf ' -d: directory\n'
printf ' -f: create freeze file\n'
printf ' -r: targeted image repository/flavor, e.g. core or latex\n'
printf ' -s: stack on which the image will be based\n'
printf ' -t: docker build target\n'
printf ' -v: increase verbosity\n'
}

printf 'Script arguments: %s\n' "$@"

if ! args=$(getopt 'c:d:f:pr:s:t:v' "$@"); then
usage && exit 1
fi
Expand All @@ -42,10 +44,6 @@ while true; do
directory="${2}"
shift 2
;;
(-f)
create_freeze='true'
shift 1
;;
(-r)
repo="${2}"
shift 2
Expand All @@ -58,6 +56,10 @@ while true; do
target="${2}"
shift 2
;;
(-f)
create_freeze='true'
shift 1
;;
(-v)
verbosity=$((verbosity + 1))
shift 1
Expand Down

0 comments on commit 9780b2f

Please sign in to comment.