Bash template is just template
This commit is contained in:
@@ -1,11 +1,15 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# !! DRAFT !!
|
# !!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
# JUST TEMPLATE
|
||||||
|
# !!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
# https://betterdev.blog/minimal-safe-bash-script-template/
|
# https://betterdev.blog/minimal-safe-bash-script-template/
|
||||||
# https://medium.com/better-programming/my-minimal-safe-bash-script-template-300759114040
|
# https://medium.com/better-programming/my-minimal-safe-bash-script-template-300759114040
|
||||||
# https://github.com/koalaman/shellcheck
|
# https://github.com/koalaman/shellcheck
|
||||||
|
|
||||||
|
echo "Just tempalte. Change it to by your requirements"
|
||||||
|
exit 10
|
||||||
|
|
||||||
set -E -o errexit -o nounset -o pipefail
|
set -E -o errexit -o nounset -o pipefail
|
||||||
trap cleanup SIGINT SIGTERM ERR EXIT
|
trap cleanup SIGINT SIGTERM ERR EXIT
|
||||||
@@ -83,7 +87,7 @@ function parse_params() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
EXTRA_ARGS+=("$opt")
|
EXTRA_ARGS+=("$ARG")
|
||||||
;;
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
@@ -98,7 +102,6 @@ a_option_flag=0
|
|||||||
abc_option_flag=0
|
abc_option_flag=0
|
||||||
flag_option_flag=0
|
flag_option_flag=0
|
||||||
|
|
||||||
|
|
||||||
parse_params "$@"
|
parse_params "$@"
|
||||||
|
|
||||||
if ((flag_option_flag)); then
|
if ((flag_option_flag)); then
|
||||||
|
|||||||
Reference in New Issue
Block a user