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}"