]> Creatis software - clitk.git/commitdiff
check if file already exists
authorpgueth <pgueth@kingkong.grid.creatis.insa-lyon.fr>
Fri, 4 Mar 2011 11:51:34 +0000 (12:51 +0100)
committerDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Thu, 20 Jun 2013 10:54:28 +0000 (12:54 +0200)
grid/upload_release.sh

index f9463239adebe48c268e3a20a55ab9a42a745e74..fe28c9e7d660005abcd6e7ab1fdbbb3749be19f1 100755 (executable)
@@ -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}"