Skip to content

Commit

Permalink
Merge pull request #8 from aperloff/GfalSupport
Browse files Browse the repository at this point in the history
More gfal-copy support
  • Loading branch information
kpedro88 authored May 2, 2020
2 parents daf3847 + 0e31097 commit 93eceb1
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions scripts/checkVomsTar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
KEEPTAR=""
XRDIR=""
NOVOMS=""
CMD=""
# check arguments
while getopts "nki:" opt; do
case "$opt" in
Expand All @@ -29,6 +30,15 @@ if [ -e ${CMSSW_VERSION}.tar.gz ]; then
ls -lth ${CMSSW_VERSION}.tar.gz
fi

if [ -n "$XRDIR" ]; then
xrdcp -f ${CMSSW_VERSION}.tar.gz ${XRDIR}/${CMSSW_VERSION}.tar.gz
if [[ "${XRDIR}" == *"root://"* ]]; then
CMD="xrdcp"
elif [[ "${XRDIR}" == *"gsiftp://"* ]]; then
CMD="env -i X509_USER_PROXY=${X509_USER_PROXY} gfal-copy"
elif [[ -n "${XRDIR}" ]]; then
echo "ERROR Unknown transfer protocol for the tarball"
exit 1
fi

if [ -n "$XRDIR" ] && [ -n "$CMD" ]; then
${CMD} -f ${CMSSW_VERSION}.tar.gz ${XRDIR}/${CMSSW_VERSION}.tar.gz
fi

0 comments on commit 93eceb1

Please sign in to comment.