diff options
author | Jim Pryor <profjim@jimpryor.net> | 2009-09-14 05:43:35 +0200 |
---|---|---|
committer | James Rayner <james@archlinux.org> | 2009-09-14 08:22:45 +0200 |
commit | 55a840edd32ac45b35c4d7c604bcfe00e0ee7fbc (patch) | |
tree | 3146bf6a577d43f91145674f397fca31064ba1a6 /src/globals | |
parent | 67f1b8fae53ebe22ad1a0557c0d7a1371b96cb0b (diff) | |
download | netctl-55a840edd32ac45b35c4d7c604bcfe00e0ee7fbc.tar.gz netctl-55a840edd32ac45b35c4d7c604bcfe00e0ee7fbc.tar.xz |
tabs->spaces, vim modelines
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
Diffstat (limited to 'src/globals')
-rw-r--r-- | src/globals | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/globals b/src/globals index bd60b35..126095a 100644 --- a/src/globals +++ b/src/globals @@ -31,15 +31,15 @@ function report_warn { } function report_notify { - true + true } function report_debug { - checkyesno "$NETCFG_DEBUG" && echo "DEBUG: $*" >&2 + checkyesno "$NETCFG_DEBUG" && echo "DEBUG: $*" >&2 } function report_try { - # JP: this needs -n option + # JP: this needs -n option echo -n ":: $*" REPORT_TRYING=1 } @@ -47,7 +47,7 @@ function report_try { function report_fail { if [[ -n "$*" ]]; then if [[ -n "$REPORT_TRYING" ]]; then - # JP: this needs -n option + # JP: this needs -n option echo -n "- $*" REPORT_TRYING= echo "[fail]" @@ -62,9 +62,9 @@ function report_fail { function report_success { if [[ -n "$*" ]]; then - # JP: this needs -n option + # JP: this needs -n option echo -n "- $*" - REPORT_TRYING= + REPORT_TRYING= fi echo "[done]" } @@ -107,18 +107,18 @@ checkyesno() function load_hooks() { - ### Load any +x files in $HOOKS_DIR and $USERHOOKS_DIR - local hook - for hook in $(find -L "$HOOKS_DIR/" "$USERHOOKS_DIR/$hook" -maxdepth 1 -type f -executable -printf '%P\n' | sort -u); do - # if there's an executable hook of this name in USERHOOKS_DIR, we only load it - if [ -x "$USERHOOKS_DIR/$hook" ]; then - source "$USERHOOKS_DIR/$hook" - else - source "$HOOKS_DIR/$hook" - fi - done + ### Load any +x files in $HOOKS_DIR and $USERHOOKS_DIR + local hook + for hook in $(find -L "$HOOKS_DIR/" "$USERHOOKS_DIR/$hook" -maxdepth 1 -type f -executable -printf '%P\n' | sort -u); do + # if there's an executable hook of this name in USERHOOKS_DIR, we only load it + if [ -x "$USERHOOKS_DIR/$hook" ]; then + source "$USERHOOKS_DIR/$hook" + else + source "$HOOKS_DIR/$hook" + fi + done } load_hooks - +# vim: ft=sh ts=4 et sw=4: |