From 980faa4ea091caff4941b0d7aa47bc19ede4eebd Mon Sep 17 00:00:00 2001 From: zimbatm Date: Tue, 18 Dec 2018 10:47:42 +0100 Subject: [PATCH] fixes shellcheck issues mainly escaping --- src/arion | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/arion b/src/arion index f7f85f8..454cfbc 100755 --- a/src/arion +++ b/src/arion @@ -105,17 +105,17 @@ modules="[" for file in "${files[@]}"; do case "$file" in /*) - modules="$modules (/. + $(printf '"%q"' $file))" + modules="$modules (/. + $(printf '"%q"' "$file"))" ;; *) - modules="$modules (./. + $(printf '"/%q"' $file))" + modules="$modules (./. + $(printf '"/%q"' "$file"))" ;; esac done modules="$modules ]" -debug modules: $modules +debug modules: "$modules" old_IFS="$IFS" IFS="" @@ -123,7 +123,7 @@ args=( ) IFS="$old_IFS" for arg in "${args[@]}"; do - echo arg: $arg + echo "arg: $arg" done do_build() { @@ -151,7 +151,7 @@ do_repl() { Launch a repl for you, using a temporary file: $REPL_TMP. This loads the configuration from the modules - $files + ${files[*]} To get started: @@ -182,7 +182,7 @@ do_repl_cleanup() { case "$command" in cat) do_build - cat $docker_compose_yaml | jq . + jq . < "$docker_compose_yaml" ;; repl) do_repl