diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-13 21:53:41 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-04-13 21:53:41 (EDT) |
commit | dc3c805efe4bd22f933e79170a165dc5833c2348 (patch) | |
tree | 145e8a357d8638d0fc231b9ac5a1154d9229e8d4 | |
parent | 1138145dfc0059467b7448b507a98885e3c0e6c0 (diff) |
src/main.sh: Prefix "static" functions with "_"
-rw-r--r-- | src/main.sh | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/main.sh b/src/main.sh index 6b57b71..74a3bca 100644 --- a/src/main.sh +++ b/src/main.sh @@ -41,7 +41,7 @@ conf_key= lock= exit_status= -handle_sig() +_handle_sig() { local sig="${1}" shift 1 @@ -55,7 +55,7 @@ handle_sig() fi } -init_sigs() +_init_sigs() { local i= local sig= @@ -69,13 +69,13 @@ init_sigs() sig="$(kill -l ${i} 2>/dev/null)" || continue case "${sig}" in 'HUP' | 'INT' | 'QUIT' | 'ABRT' | 'ALRM' | 'TERM') - trap "handle_sig ${i}" ${i} + trap "_handle_sig ${i}" ${i} ;; esac done } -get_options() +_get_options() { local opt= @@ -90,7 +90,7 @@ get_options() return 0 } -lock() +_lock() { mkdir -p "${base_dir}/.db" lock="${base_dir}/.db/lock" @@ -99,7 +99,7 @@ lock() fi } -get_conf() +_get_conf() { local old_dir= @@ -132,11 +132,11 @@ get_conf() init() { - lock - get_conf + _lock + _get_conf } -unlock() +_unlock() { rm -f "${lock}" } @@ -145,7 +145,7 @@ fini() { update_feeds collect_garbage - unlock + _unlock } main() @@ -161,10 +161,10 @@ main() builddir='' fi - init_sigs + _init_sigs load_locale - get_options "${@}" + _get_options "${@}" shift $((${OPTIND} - 1)) base_dir="${opt_b:-.}" |