automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC 05/20] depcomp: safer quoting in variable expansion


From: Stefano Lattarini
Subject: [RFC 05/20] depcomp: safer quoting in variable expansion
Date: Thu, 18 Oct 2012 22:40:39 +0200

* lib/depcomp (pgcc): Here.  Probably not needed, but since the
rest of the script seems to employ proper quoting, better to be
consistent.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 lib/depcomp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/depcomp b/lib/depcomp
index dbcacd0..2f0c6c5 100755
--- a/lib/depcomp
+++ b/lib/depcomp
@@ -358,24 +358,24 @@ pgcc)
   lockdir=$base.d-lock
   trap "
     echo '$0: caught signal, cleaning up...' >&2
-    rmdir $lockdir
+    rmdir '$lockdir'
     exit 1
   " 1 2 13 15
   numtries=100
   i=$numtries
   while test $i -gt 0 ; do
     # mkdir is a portable test-and-set.
-    if mkdir $lockdir 2>/dev/null; then
+    if mkdir "$lockdir" 2>/dev/null; then
       # This process acquired the lock.
       "$@" -MD
       stat=$?
       # Release the lock.
-      rmdir $lockdir
+      rmdir "$lockdir"
       break
     else
       ## the lock is being held by a different process,
       ## wait until the winning process is done or we timeout
-      while test -d $lockdir && test $i -gt 0; do
+      while test -d "$lockdir" && test $i -gt 0; do
         sleep 1
         i=`expr $i - 1`
       done
-- 
1.8.0.rc2.11.gd25c58c




reply via email to

[Prev in Thread] Current Thread [Next in Thread]