From: pgueth Date: Mon, 7 Mar 2011 10:54:48 +0000 (+0100) Subject: bugfix X-Git-Tag: v1.4.0~186 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=daf93b65d3cb306460bb353747c2df9296f55896;p=clitk.git bugfix --- diff --git a/grid/common.sh b/grid/common.sh index 66203b6..bb0b05b 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?" || exit 2 + lcg-del -a "lfn:${destlfn}" +fi +echo "lets roll" lcg-cr -v -d ccsrm02.in2p3.fr -l "lfn:${destlfn}" "file:${sourcefile}" }