Browse Source

Use more consistent and readable local variable names

Alois Mahdal 7 years ago
parent
commit
f6333b29d8
1 changed files with 8 additions and 8 deletions
  1. 8
    8
      src/saturnin.sh.skel

+ 8
- 8
src/saturnin.sh.skel View File

311
     # unless syntax check fails, execute it as Bash code (in separate
311
     # unless syntax check fails, execute it as Bash code (in separate
312
     # process).
312
     # process).
313
     #
313
     #
314
-    local hname="$1"    # hook name
315
-    local hook_code     # ... code
314
+    local name="$1"     # hook name
315
+    local code          # ... code
316
     test -n "$SATURNIN_SUBCOMMAND" || {
316
     test -n "$SATURNIN_SUBCOMMAND" || {
317
-        warn "unknown subcommand, ignoring hook: $hname"
317
+        warn "unknown subcommand, ignoring hook: $name"
318
         return 0
318
         return 0
319
     }
319
     }
320
-    hook_code="$(saturnin__conf -j "hook.$SATURNIN_SUBCOMMAND.$hname")"
321
-    debug -v SATURNIN_SUBCOMMAND hook_code hname
322
-    bash -n <<<"$hook_code" || {
323
-        warn "syntax errors, ignoring hook: $hname"
320
+    code="$(saturnin__conf -j "hook.$SATURNIN_SUBCOMMAND.$name")"
321
+    debug -v SATURNIN_SUBCOMMAND code name
322
+    bash -n <<<"$code" || {
323
+        warn "syntax errors, ignoring hook: $name"
324
         return 0
324
         return 0
325
     }
325
     }
326
-    eval "$hook_code"
326
+    eval "$code"
327
 }
327
 }
328
 
328
 
329
 saturnin__runsc() {
329
 saturnin__runsc() {