From 77bfed091aae609d2d19c084921ce5b6aef43f68 Mon Sep 17 00:00:00 2001 From: pgueth Date: Fri, 4 Mar 2011 12:51:34 +0100 Subject: [PATCH] check if file already exists --- grid/upload_release.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/grid/upload_release.sh b/grid/upload_release.sh index f946323..fe28c9e 100755 --- a/grid/upload_release.sh +++ b/grid/upload_release.sh @@ -14,4 +14,6 @@ echo "releasename=${releasename}" echo "lfnrelease=${lfnrelease}" check_user || exit 2 -lcg-cr -v -d ccsrm02.in2p3.fr -l "lfn:${lfnrelease}${releasename}" "file:${releasearchive}" +target="${lfnrelease}${releasename}" +file_exists ${target} && ( check_user "${target} already exists. overwrite it?" || return 0 ) +lcg-cr -v -d ccsrm02.in2p3.fr -l "lfn:${target}" "file:${releasearchive}" -- 2.47.1