]> Creatis software - clitk.git/commitdiff
upload_workflow script works
authorpgueth <pgueth@kingkong.grid.creatis.insa-lyon.fr>
Fri, 4 Mar 2011 14:30:20 +0000 (15:30 +0100)
committerDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Thu, 20 Jun 2013 11:14:23 +0000 (13:14 +0200)
grid/common.sh

index ab6b527a8666f08b7a0137119f0f67f0da5db340..66203b6d3a68d55a8b067a2c2ae9a84e86bddc95 100644 (file)
@@ -42,10 +42,11 @@ sourcefile=${1:?"provide source file"}
 destlfn=${2:?"provide destination file lfn"}
 sourcefile="$(readlink -f "${sourcefile}")" # convert to absolute path
 test -f "${sourcefile}" || error "can't find ${sourcefile}"
-file_exists ${destlfn} && ( \
-       check_user "${destlfn} already exists. overwrite it?" || return 2 && \
-       lcg-del -a "lfn:${destlfn}" || error "failed to delete ${destlfn}" \
-) && \
+echo "uploading ${sourcefile} to ${destlfn}"
+file_exists "${destlfn}" \
+       && check_user "${destlfn} already exists. overwrite it?" \
+       && lcg-del -a "lfn:${destlfn}" \
+       || return 2
 lcg-cr -v -d ccsrm02.in2p3.fr -l "lfn:${destlfn}" "file:${sourcefile}" 
 }
 
@@ -53,7 +54,7 @@ lcg-cr -v -d ccsrm02.in2p3.fr -l "lfn:${destlfn}" "file:${sourcefile}"
 # common path used
 lfnbase="/grid/biomed/creatis/fgate/"
 lfnrelease="${lfnbase}releases/"
-lfnworkflow="${lfnbase}"
+lfnworkflow="${lfnbase}workflow/"
 lfngasw="${lfnbase}gasw/"
 lfnscript="${lfnbase}bin/"