Skip to content
Snippets Groups Projects
Commit 220d299d authored by Markus Opolka's avatar Markus Opolka
Browse files

Add proper usage of usage()

parent 8a302e32
No related branches found
No related tags found
1 merge request!9Add proper usage of usage()
Pipeline #27421 passed
#!/bin/bash #!/bin/bash
set -e set -e
## config ## config
...@@ -14,13 +15,24 @@ SCRIPT_HOME="$(dirname "$(readlink -f "$0")")" ...@@ -14,13 +15,24 @@ SCRIPT_HOME="$(dirname "$(readlink -f "$0")")"
usage() { usage() {
echo "$0 <target>" echo "$0 <target>"
echo echo
echo "This starts a Container speficied as first arguments. Example:"
echo "icinga-build-docker centos/7:x86_64"
echo
echo "The Container will then run icinga-build-package as CMD"
echo "Important: This script needs to run in the directory that contains the build"
} }
if [[ "$1" = "--help" ]]; then
usage
exit 0
fi
if [ -n "$1" ]; then if [ -n "$1" ]; then
TARGET="$1" TARGET="$1"
shift shift
else else
echo "Target is missing!" >&2 echo "Target is missing!" >&2
usage
exit 1 exit 1
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment