Skip to content

Commit

Permalink
Removed unused vars
Browse files Browse the repository at this point in the history
Cleaned up unused vars from refactor
  • Loading branch information
richbl committed Apr 13, 2016
1 parent ca942d7 commit d2b1042
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions bash_template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,15 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# -----------------------------------------------------------------------------
#
# A bash template (BaT)
#
# version: 0.1.0
#
# requirements:
#
# --jq program installed: used to parse /data/config.json
#
# inputs:
#
# --[user-config] configured through /data/config.json
#
# outputs:
#
# --notification of script success/failure
# --side-effect(s): [user-config]
#
Expand All @@ -51,28 +47,21 @@ EXEC_DIR="$(dirname "$0")"
. ${EXEC_DIR}/lib/args

ARGS_FILE="${EXEC_DIR}/data/config.json"
declare -A ARGS

# [user-config] set any external program dependencies here
declare -a REQ_PROGRAMS=('jq')

# -----------------------------------------------------------------------------
# check script dependencies and set vars
#
check_dependencies "REQ_PROGRAMS[@]"
COUNT_ARGS=$(jq '.arguments | length'< ${ARGS_FILE})

# -----------------------------------------------------------------------------
# perform script configuration, arguments parsing, and validation
#
check_dependencies "REQ_PROGRAMS[@]"
display_banner
scan_for_args "$@"
check_for_args_completeness

# -----------------------------------------------------------------------------
# [user-config] any code from this point on is custom code...
# the bash template has completed all of the necessary argument configuration
# and management work
# [user-config] any code from this point on is custom code, using
# the sevices and variables available through the template
#
echo "Doing something."
echo
Expand Down

0 comments on commit d2b1042

Please sign in to comment.