From: Bruno Haible Date: Wed, 17 Oct 2018 17:01:20 +0000 (+0200) Subject: examples: Correctly clean up left-over files. X-Git-Tag: v0.20~349 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7b7b16dacbaf765b7d516fc01d0904a063daa02;p=thirdparty%2Fgettext.git 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. --- 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