From: pgueth Date: Fri, 4 Mar 2011 11:51:34 +0000 (+0100) Subject: check if file already exists X-Git-Tag: v1.4.0~195 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=77bfed091aae609d2d19c084921ce5b6aef43f68;p=clitk.git check if file already exists --- 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}"