X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=grid%2Fcommon.sh;h=853cef92e407620b8972fb76b79c82af2da8dcc1;hb=77dfd147f4a13a5dfeb10da3a0ec72dae9090da1;hp=66203b6d3a68d55a8b067a2c2ae9a84e86bddc95;hpb=2ed0d337580044c160e15863df5dc6e27f7f70e2;p=clitk.git diff --git a/grid/common.sh b/grid/common.sh index 66203b6..853cef9 100644 --- a/grid/common.sh +++ b/grid/common.sh @@ -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}" }