check_format: Use $output_dir to store shfmt patch in

If $output_dir is set, putting the shfmt diff there will make it
easier to extract it and/or look it up from the side of the per
patch build.

Change-Id: Iefb601a29f165e59b7670a8878e95bb6b16c9650
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2277
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Michal Berger 2020-05-08 13:02:55 +02:00 committed by Tomasz Zawadzki
parent 6f702d4ea7
commit c988348361

View File

@ -338,7 +338,7 @@ if [ -n "$shfmt" ]; then
shfmt_cmdline+=(-d) # diffOut - print diff of the changes and exit with != 0
shfmt_cmdline+=(-sr) # redirect operators will be followed by a space
diff=$PWD/$shfmt.patch
diff=${output_dir:-$PWD}/$shfmt.patch
# Explicitly tell shfmt to not look for .editorconfig. .editorconfig is also not looked up
# in case any formatting arguments has been passed on its cmdline.