]> Creatis software - clitk.git/blobdiff - grid/common.sh
more grid script
[clitk.git] / grid / common.sh
index 66203b6d3a68d55a8b067a2c2ae9a84e86bddc95..853cef92e407620b8972fb76b79c82af2da8dcc1 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?" || return 2
+       lcg-del -a "lfn:${destlfn}"
+fi
+echo "lets roll"
 lcg-cr -v -d ccsrm02.in2p3.fr -l "lfn:${destlfn}" "file:${sourcefile}" 
 }