]> Creatis software - clitk.git/commitdiff
bugfix
authorpgueth <pgueth@kingkong.grid.creatis.insa-lyon.fr>
Mon, 7 Mar 2011 10:54:48 +0000 (11:54 +0100)
committerDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Thu, 20 Jun 2013 11:14:23 +0000 (13:14 +0200)
grid/common.sh

index 66203b6d3a68d55a8b067a2c2ae9a84e86bddc95..bb0b05b7f64771cabcf3042db11f4d180d5d90b0 100644 (file)
@@ -43,10 +43,11 @@ destlfn=${2:?"provide destination file lfn"}
 sourcefile="$(readlink -f "${sourcefile}")" # convert to absolute path
 test -f "${sourcefile}" || error "can't find ${sourcefile}"
 echo "uploading ${sourcefile} to ${destlfn}"
-file_exists "${destlfn}" \
-       && check_user "${destlfn} already exists. overwrite it?" \
-       && lcg-del -a "lfn:${destlfn}" \
-       || return 2
+if file_exists "${destlfn}"; then
+       check_user "${destlfn} already exists. overwrite it?" || exit 2
+       lcg-del -a "lfn:${destlfn}"
+fi
+echo "lets roll"
 lcg-cr -v -d ccsrm02.in2p3.fr -l "lfn:${destlfn}" "file:${sourcefile}" 
 }