From: pgueth Date: Fri, 4 Mar 2011 08:40:09 +0000 (+0100) Subject: upload release script works X-Git-Tag: v1.4.0~197 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=bf817d53ffa386330b3d5153ab8e36c71ca05998;p=clitk.git upload release script works --- diff --git a/grid/upload_release.sh b/grid/upload_release.sh index 5b55822..e0cd8a7 100755 --- a/grid/upload_release.sh +++ b/grid/upload_release.sh @@ -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}"