]> Creatis software - clitk.git/commitdiff
wrote upload function
authorpgueth <pgueth@kingkong.grid.creatis.insa-lyon.fr>
Fri, 4 Mar 2011 14:06:50 +0000 (15:06 +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 fe28c9e7d660005abcd6e7ab1fdbbb3749be19f1..9c61b4229b8c56224da420e6500daece371f08af 100755 (executable)
@@ -3,7 +3,6 @@
 . common.sh
 
 releasearchive="${1:?"provide path to release archive"}"
-releasearchive="$(readlink -f "${releasearchive}")" # convert to absolute path
 test -f ${releasearchive} || error "file ${releasearchive} doesn't exist"
 releasename="${prefix}$(basename "${releasearchive}")"
 
@@ -14,6 +13,4 @@ echo "releasename=${releasename}"
 echo "lfnrelease=${lfnrelease}"
 check_user || exit 2
 
-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}"
+upload_file "${releasearchive}" "${lfnrelease}${releasename}" && echo "success" || echo "failed"