From c7b7b16dacbaf765b7d516fc01d0904a063daa02 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 17 Oct 2018 19:01:20 +0200 Subject: [PATCH] examples: Correctly clean up left-over files. * gettext-tools/examples/hello-csharp/autoclean.sh: Handle shell wildcard correctly. * gettext-tools/examples/hello-csharp-forms/autoclean.sh: Likewise. --- gettext-tools/examples/hello-csharp-forms/autoclean.sh | 6 ++++-- gettext-tools/examples/hello-csharp/autoclean.sh | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gettext-tools/examples/hello-csharp-forms/autoclean.sh b/gettext-tools/examples/hello-csharp-forms/autoclean.sh index f5d2f4685..4e62a93e1 100755 --- a/gettext-tools/examples/hello-csharp-forms/autoclean.sh +++ b/gettext-tools/examples/hello-csharp-forms/autoclean.sh @@ -39,6 +39,8 @@ rm -f config.sub rm -f po/*.pot rm -f po/stamp-po for f in po/*/*.resources.dll; do - rm -f $f - rmdir `echo $f | sed -e 's,/[^/]*$,,'` + if test -f "$f"; then + rm -f "$f" + rmdir `echo $f | sed -e 's,/[^/]*$,,'` + fi done diff --git a/gettext-tools/examples/hello-csharp/autoclean.sh b/gettext-tools/examples/hello-csharp/autoclean.sh index f5d2f4685..4e62a93e1 100755 --- a/gettext-tools/examples/hello-csharp/autoclean.sh +++ b/gettext-tools/examples/hello-csharp/autoclean.sh @@ -39,6 +39,8 @@ rm -f config.sub rm -f po/*.pot rm -f po/stamp-po for f in po/*/*.resources.dll; do - rm -f $f - rmdir `echo $f | sed -e 's,/[^/]*$,,'` + if test -f "$f"; then + rm -f "$f" + rmdir `echo $f | sed -e 's,/[^/]*$,,'` + fi done -- 2.47.3