Message ID | 20170208041658.14350-1-dja@axtens.net |
---|---|
State | Accepted |
Headers | show |
On Wed, 2017-02-08 at 15:16 +1100, Daniel Axtens wrote: > 2d142b2c0a27 ("bin: Run scripts through shellcheck") changes an > ls to a find. find output includes the directory name, unlike ls. > This breaks the script, because it prepends the mail directory > later on. > > Remove the prepending in the script - leave it exclusively to find. > > Fixes: 2d142b2c0a27 ("bin: Run scripts through shellcheck") > Cc: stephen@that.guru > Signed-off-by: Daniel Axtens <dja@axtens.net> Oops, good spot. We could do with tests for these scripts but that's a problem for another day. Reviewed-by: Stephen Finucane <stephen@that.guru> ...and applied.
diff --git a/patchwork/bin/parsemail-batch.sh b/patchwork/bin/parsemail-batch.sh index 853679103595..d42712ed0995 100755 --- a/patchwork/bin/parsemail-batch.sh +++ b/patchwork/bin/parsemail-batch.sh @@ -40,5 +40,5 @@ shift find "$mail_dir" -maxdepth 1 | while read -r line; do echo "$line" - "$BIN_DIR/parsemail.sh" "$@" < "$mail_dir/$line" + "$BIN_DIR/parsemail.sh" "$@" < "$line" done
2d142b2c0a27 ("bin: Run scripts through shellcheck") changes an ls to a find. find output includes the directory name, unlike ls. This breaks the script, because it prepends the mail directory later on. Remove the prepending in the script - leave it exclusively to find. Fixes: 2d142b2c0a27 ("bin: Run scripts through shellcheck") Cc: stephen@that.guru Signed-off-by: Daniel Axtens <dja@axtens.net> --- patchwork/bin/parsemail-batch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)