]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
examples: Correctly clean up left-over files.
authorBruno Haible <bruno@clisp.org>
Wed, 17 Oct 2018 17:01:20 +0000 (19:01 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 17 Oct 2018 17:02:42 +0000 (19:02 +0200)
* 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
gettext-tools/examples/hello-csharp/autoclean.sh

index f5d2f46858b48a1411a6125d645a2e4b3545d3fd..4e62a93e18ccee47d1e16684a370402f2035d336 100755 (executable)
@@ -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
index f5d2f46858b48a1411a6125d645a2e4b3545d3fd..4e62a93e18ccee47d1e16684a370402f2035d336 100755 (executable)
@@ -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