mirror of
https://github.com/kvz/bash3boilerplate.git
synced 2025-06-18 14:18:06 +00:00
Cleanup all *.sh following shellcheck advice (#80)
* Cleanup all *.sh following shellcheck advice Closes #79 * do not shellcheck scripts out of our control
This commit is contained in:
committed by
Kevin van Zonneveld
parent
044ef6d1c5
commit
785e7e9f8b
@ -1,16 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck source=main.sh
|
||||
|
||||
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)"
|
||||
__root="$(cd "$(dirname "$(dirname "$(dirname "${__dir}")")")" && pwd)"
|
||||
|
||||
# Set __usage and source main.sh
|
||||
read -r -d '' __usage <<-'EOF' || true # exits non-zero when EOF encountered
|
||||
-0 --zero Do nothing.
|
||||
-1 --one Do one thing. Required.
|
||||
|
Reference in New Issue
Block a user