This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

keychain patch (was: Filenames with spaces: very rare in Cygwin)


--- /bin/keychain	2003-11-22 10:40:13.001000000 -0800
+++ ./keychain	2003-11-25 13:17:16.296875000 -0800
@@ -9,6 +9,9 @@
 
 PATH="/sbin:/usr/sbin:${PATH}:/usr/ucb"; export PATH;
 
+LISTSEP="
+"                       # Separate list elements with linefeed for splitting.
+
 myaction=""
 myactionarg=""
 noaskopt=""
@@ -55,7 +58,7 @@
 			nocolopt="yes"
 			;;
 		*)
-			mykeys="${mykeys} $1"
+			mykeys="${mykeys}${LISTSEP}$1"
 			;;
 	esac
 	shift
@@ -219,15 +222,15 @@
 cshpidf="${keydir}/${hostname}-csh"
 lockf="${keydir}/${hostname}-lock"
 
-if [ -f ${keydir} ]
+if [ -f "${keydir}" ]
 then
 	echo "$0: ${keydir} is a file (it should be a directory;) please fix."
 	exit 1
 #Solaris 9 doesn't have -e; using -d....
-elif [ ! -d ${keydir} ]
+elif [ ! -d "${keydir}" ]
 then
-	mkdir ${keydir} || exit 1
-	chmod 0700 ${keydir}
+	mkdir "${keydir}" || exit 1
+	chmod 0700 "${keydir}"
 fi
 
 # perform lock if we have lockfile available                                    
@@ -301,9 +304,9 @@
 fi
 
 SSH_AGENT_PID="NULL"
-if [ -f $pidf ]
+if [ -f "$pidf" ]
 then
-	. $pidf	
+	. "$pidf"
 fi
 
 # Copy application-specific environment variables into generic local variables.
@@ -441,7 +444,7 @@
 		done
 		if [ $skip -ne 1 ]
 		then
-			missingkeys="$missingkeys $x"
+			missingkeys="$missingkeys${LISTSEP}$x"
 			mcount=`expr $mcount + 1`
 		fi
 	done



-- 
Steven E. Harris        :: seharris@raytheon.com
Raytheon                :: http://www.raytheon.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]