[Swift-commit] r5299 - trunk/libexec

wozniak at ci.uchicago.edu wozniak at ci.uchicago.edu
Mon Nov 14 18:11:46 CST 2011


Author: wozniak
Date: 2011-11-14 18:11:46 -0600 (Mon, 14 Nov 2011)
New Revision: 5299

Modified:
   trunk/libexec/cdm_lib.sh
Log:
Improvement to cdm_lib.sh logging


Modified: trunk/libexec/cdm_lib.sh
===================================================================
--- trunk/libexec/cdm_lib.sh	2011-11-15 00:07:09 UTC (rev 5298)
+++ trunk/libexec/cdm_lib.sh	2011-11-15 00:11:46 UTC (rev 5299)
@@ -31,6 +31,7 @@
 	case $POLICY in
 		DIRECT)
 			DIRECT_DIR=${ARGS[0]}
+			[[ $DIRECT_DIR == "/" ]] && DIRECT_DIR=""
 			log "CDM[DIRECT]: Linking to $DIRECT_DIR/$FILE via $JOBDIR/$FILE"
 			if [ $MODE == "INPUT" ]; then
 				[ -f "$DIRECT_DIR/$FILE" ]
@@ -38,10 +39,8 @@
 				ln -s $DIRECT_DIR/$FILE $JOBDIR/$FILE
 				checkError 254 "CDM[DIRECT]: Linking to $DIRECT_DIR/$FILE failed!"
 			elif [ $MODE == "OUTPUT" ]; then
-				mkdir -p $DIRECT_DIR
-				checkError 254 "CDM[DIRECT]: mkdir -p $DIRECT_DIR failed!"
 				mkdir -p $( dirname $DIRECT_DIR/$FILE )
-				checkError 254 "CDM[DIRECT]: mkdir -p $( dirname $FILE ) failed!"
+				checkError 254 "CDM[DIRECT]: mkdir -p $( dirname $DIRECT_DIR/$FILE ) failed!"
 				touch $DIRECT_DIR/$FILE
 				checkError 254 "CDM[DIRECT]: Touching $DIRECT_DIR/$FILE failed!"
 				ln -s $DIRECT_DIR/$FILE $JOBDIR/$FILE




More information about the Swift-commit mailing list