]> Creatis software - clitk.git/commitdiff
upload release script works
authorpgueth <pgueth@kingkong.grid.creatis.insa-lyon.fr>
Fri, 4 Mar 2011 08:40:09 +0000 (09:40 +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 5b55822d8d966047ee4d78fd6c199b5fb9574f12..e0cd8a7f6c95eababa82ce6ff18d443c5f126ee1 100755 (executable)
@@ -28,15 +28,18 @@ test "${answer}" == "n" && return 1
 check_user "${prompt}"
 }
 
-
 releaselfndir="/grid/biomed/creatis/fgate/releases/"
 prefix="${USER:?"USER must be set"}_"
-releasearchive=${1:?"provide path to release archive"}
-targetreleasearchive="${prefix}$(basename "${releasearchive}")"
+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}")"
 
 ensure_proxy || error "no valid proxy"
 
-echo "targetreleasearchive=${targetreleasearchive}"
+echo "releasearchive=${releasearchive}"
+echo "releasename=${releasename}"
 echo "releaselfndir=${releaselfndir}"
-check_user || error "user doesn't agree"
+check_user || exit 2
 
+lcg-cr -v -d ccsrm02.in2p3.fr -l "lfn:${releaselfndir}${releasename}" "file:${releasearchive}"