Skip to content

Commit 04bb294

Browse files
committed
clean up shellcheck warnings
1 parent 14887c1 commit 04bb294

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ e end: # stop app
1212

1313
.PHONY: t test
1414
t test: # run all tests or specific test [vars: name]
15-
@[[ -n "$(1)" ]] && echo "run test $(1)" || echo "run test all"
15+
@[[ -n $(1) ]] && echo "run test $(1)" || echo "run test all"
1616

1717
.PHONY: tests
18-
tests: # run multiple tests [vars: names]
18+
tests: # run multiple tests [vars: name1, name2, etc.]
1919
@echo "run tests $(@)"
2020

2121
.PHONY: r repl

Runfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ e end: # stop app
66
echo "stop app"
77

88
t test: # run all tests or specific test [vars: name]
9-
[[ -n "$(1)" ]] && echo "run test $(1)" || echo "run test all"
9+
[[ -n $(1) ]] && echo "run test $(1)" || echo "run test all"
1010

11-
tests: # run multiple tests [vars: names]
11+
tests: # run multiple tests [vars: name1, name2, etc.]
1212
echo "run tests $(@)"
1313

1414
r repl: # start shell in project environment [vars: env='']

runfile.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ e end: # stop app
2020
echo "stop app"
2121
t test: # run all tests or specific test [vars: name]
2222
[[ -n \$(1) ]] && echo "run test \$(1)" || echo "run test all"
23-
tests: # run multiple tests [vars: names]
23+
tests: # run multiple tests [vars: name1, name2, etc.]
2424
echo "run tests \$(@)"
2525
r repl: # start shell in project environment [vars: env='']
2626
echo "start shell in project environment: \$(env)"
@@ -37,7 +37,7 @@ e end: # stop app
3737
t test: # run all tests or specific test [vars: name]
3838
[[ -n \$(1) ]] && echo "run test \$(1)" || echo "run test all"
3939
40-
tests: # run multiple tests [vars: names]
40+
tests: # run multiple tests [vars: name1, name2, etc.]
4141
echo "run tests \$(@)"
4242
4343
r repl: # start shell in project environment [vars: env='']
@@ -105,7 +105,7 @@ function cd-to-nearest-file() { local lower='' upper='' title=''
105105
}
106106
107107
function main() ( set -euo pipefail
108-
local makefile='' buffer='' at='' ws='' rewrite='' cmd=''
108+
local makefile='' buffer='' at='' rewrite='' cmd=''
109109
local arg='' make_args=() cmd_args=() pos_args=() pos_arg_idx=0
110110
111111
# Handle various optional actions:
@@ -124,7 +124,6 @@ function main() ( set -euo pipefail
124124
# Local values:
125125
makefile="$( mktemp )" # Temporary makefile which we will pass to make.
126126
at="@" # @-prefix causes make to execute commands silently.
127-
args=() # Arguments that will be passed on to invoked run command.
128127
129128
# Existing Makefile Compatibility:
130129
# If 'run cmd' or 'make cmd' appears within another command in a Runfile,
@@ -239,10 +238,10 @@ EOF
239238
else
240239
if grep -qE '\$\([@0-9]\)' "${makefile}"
241240
then
242-
echo 'Warning: Your runfile uses positional args $(@) $(1) $(2) etc.'
241+
echo "Warning: Your runfile uses positional args \$(@) \$(1) \$(2) etc."
243242
echo "which aren't compatible with Make. You'll need to update these"
244-
echo 'commands to accept standard Make-style named arguments:'
245-
echo '$(abc) in your Makefile, passed to task as: $ make task abc=xyz'
243+
echo "commands to accept standard Make-style named arguments:"
244+
echo "\$(abc) in your Makefile, passed to task as: $ make task abc=xyz"
246245
echo
247246
fi
248247
print-makefile "${makefile}" > ./Makefile

0 commit comments

Comments
 (0)