mirror of
https://github.com/kvz/bash3boilerplate.git
synced 2025-01-20 19:18:46 +00:00
9350e0574c
If the description of an option contains the single word sentence 'Required.' it is understood as a required argument and automatic validation will make sure that it is set or end the script by calling help. Alternatively, if the argument within the __usage string is {arg} instead of [arg] it is understood as a required argument and automatic validation will make sure that it is set or end the script by calling help (even if 'Required.' is not in the description). Closes #22
16 lines
414 B
Bash
Executable File
16 lines
414 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -o pipefail
|
|
set -o errexit
|
|
set -o nounset
|
|
# set -o xtrace
|
|
|
|
# Set magic variables for current FILE & DIR
|
|
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
|
|
__base="$(basename ${__file} .sh)"
|
|
__root="$(cd "$(dirname $(dirname $(dirname "${__dir}")))" && pwd)"
|
|
|
|
echo "ACCPTST:STDIO_REPLACE_DATETIMES"
|
|
|
|
bash "${__root}/main.sh" -f /tmp/x -h
|