[Swift-commit] r6331 - trunk/libexec

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Tue Mar 5 21:03:15 CST 2013


Author: davidk
Date: 2013-03-05 21:03:15 -0600 (Tue, 05 Mar 2013)
New Revision: 6331

Modified:
   trunk/libexec/_swiftwrap.wrapperstaging
Log:
A few fixes for local copying


Modified: trunk/libexec/_swiftwrap.wrapperstaging
===================================================================
--- trunk/libexec/_swiftwrap.wrapperstaging	2013-03-05 16:29:26 UTC (rev 6330)
+++ trunk/libexec/_swiftwrap.wrapperstaging	2013-03-06 03:03:15 UTC (rev 6331)
@@ -58,6 +58,8 @@
 localPath() {
 	# remove protocol://
 	PATH="${1#*://}"
+        # Remove hostname
+        PATH="${PATH#*/}"
 	# remove leading "/" if present
 	PATH="${PATH#/}"
 	log "Transformed $1 to $PATH"
@@ -67,7 +69,7 @@
 stagein() {
 	SRC=$1
 	DST=$2
-	
+  	
 	case $SRC in
 		*://*)
 			;;
@@ -85,7 +87,7 @@
 			if [ ! -f $SRC ]; then
 				fail 254 "Cannot stage in $SRC. File not found."
 			fi
-			cp $SRC $DST 2>&1 >& "$INFO"
+			dd if=$SRC of=$DST bs=16M 2>&1 >& "$INFO"
 			;;
 		http://*)
 			log "Fetching $SRC using wget"
@@ -453,8 +455,10 @@
 			eval cdm_action $DIR "INPUT" $L $CDM_POLICY
 			continue
 		fi
-		
-		stagein $L "$DIR/`localPath $L`"
+	
+                SRC=$( localPath $L )
+                DST=$DIR/$( localPath $L )
+                stagein $SRC $DST
 	done
 	
 	if [[ $CDM_FILE != "" ]]; then




More information about the Swift-commit mailing list