packages: openssl/openssl-c_rehash.sh - use 'ls -1 *' in place of 'for f in...

baggins baggins at pld-linux.org
Wed May 5 13:49:53 CEST 2010


Author: baggins                      Date: Wed May  5 11:49:53 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- use 'ls -1 *' in place of 'for f in *' to avoid problems with spaces in file names

---- Files affected:
packages/openssl:
   openssl-c_rehash.sh (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: packages/openssl/openssl-c_rehash.sh
diff -u packages/openssl/openssl-c_rehash.sh:1.3 packages/openssl/openssl-c_rehash.sh:1.4
--- packages/openssl/openssl-c_rehash.sh:1.3	Wed May  5 13:08:54 2010
+++ packages/openssl/openssl-c_rehash.sh	Wed May  5 13:49:47 2010
@@ -131,14 +131,8 @@
 
     cd ${1}
 
-    for FILE in *
+    ls -1 * 2>/dev/null | while read FILE
     do
-	# no files in directory at all, no point in continuing
-	if ! [ -f ${FILE} ]
-	then
-	    return 1
-	fi
-
         if echo ${FILE} | grep -q -E '^[[:xdigit:]]{8}\.r?[[:digit:]]+$' \
 	    	&& [ -h "${FILE}" ]
         then
@@ -146,14 +140,8 @@
         fi
     done
 
-    for FILE in *.pem
+    ls -1 *.pem 2>/dev/null | while read FILE
     do
-	# no pem files so FILE gets set to the unexpanded *.pem
-	if ! [ -f ${FILE} ]
-	then
-	    break
-	fi
-
 	check_file ${FILE}
         local FILE_TYPE=${?}
 	local TYPE_STR=''
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/openssl/openssl-c_rehash.sh?r1=1.3&r2=1.4&f=u



More information about the pld-cvs-commit mailing list