From e8d81a61e1b9e28267164f751dee5b9b59444e71 Mon Sep 17 00:00:00 2001 From: Mao Zhongyi Date: Fri, 16 Nov 2018 14:33:03 -0600 Subject: qemu-iotests: convert `pwd` and $(pwd) to $PWD POSIX requires $PWD to be reliable, and we expect all shells used by qemu scripts to be relatively close to POSIX. Thus, it is smarter to avoid forking the pwd executable for something that is already available in the environment. So replace it with the following: sed -i 's/\(`pwd`\|\$(pwd)\)/$PWD/g' $(git grep -l pwd) Then delete a pointless line assigning PWD to itself. Cc: kwolf@redhat.com Cc: mreitz@redhat.com Cc: eblake@redhat.com Suggested-by: Eric Blake Signed-off-by: Mao Zhongyi Message-Id: <20181024094051.4470-2-maozhongyi@cmss.chinamobile.com> Reviewed-by: Eric Blake [eblake: touch up commit message, reorder series, tweak a couple more files] Signed-off-by: Eric Blake --- scripts/coccinelle/tcg_gen_extract.cocci | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/coccinelle') diff --git a/scripts/coccinelle/tcg_gen_extract.cocci b/scripts/coccinelle/tcg_gen_extract.cocci index 81e66a35ae..c10c863482 100644 --- a/scripts/coccinelle/tcg_gen_extract.cocci +++ b/scripts/coccinelle/tcg_gen_extract.cocci @@ -17,7 +17,7 @@ // --keep-comments --in-place \ // --use-gitgrep --dir target // -// $ docker run --rm -v `pwd`:`pwd` -w `pwd` philmd/coccinelle \ +// $ docker run --rm -v $PWD:$PWD -w $PWD philmd/coccinelle \ // --macro-file scripts/cocci-macro-file.h \ // --sp-file scripts/coccinelle/tcg_gen_extract.cocci \ // --keep-comments --in-place \ -- cgit v1.2.3-55-g7522