From daf93b65d3cb306460bb353747c2df9296f55896 Mon Sep 17 00:00:00 2001 From: pgueth Date: Mon, 7 Mar 2011 11:54:48 +0100 Subject: [PATCH] bugfix --- grid/common.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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}" } -- 2.45.1