File indexing completed on 2024-04-06 12:28:25
0001
0002
0003
0004 dir=${1:-"benchmarks"}
0005 suite=${2:-"forPR"}
0006 afs_or_eos=${3:-"eos"}
0007 lxpuser=${4:=${USER}}
0008
0009
0010 source xeon_scripts/common-variables.sh ${suite}
0011 source xeon_scripts/init-env.sh
0012
0013
0014 echo "Tarring plot directory"
0015 tarball=${dir}.tar.gz
0016 tar -zcvf ${tarball} ${dir}
0017
0018
0019 LXPLUS_HOST=${lxpuser}@lxplus.cern.ch
0020 LXPLUS_OUTDIR=www
0021 LXPLUS_WORKDIR=user/${lxpuser:0:1}/${lxpuser}
0022
0023 if [[ "${afs_or_eos}" == "afs" ]]
0024 then
0025 LXPLUS_WORKDIR=/afs/cern.ch/${LXPLUS_WORKDIR}
0026 elif [[ "${afs_or_eos}" == "eos" ]]
0027 then
0028 LXPLUS_WORKDIR=/eos/${LXPLUS_WORKDIR}
0029 else
0030 echo "${afs_or_eos} is not a valid option! Choose either 'afs' or 'eos'! Exiting..."
0031 exit
0032 fi
0033
0034
0035 scp -r ${tarball} ${LXPLUS_HOST}:${LXPLUS_WORKDIR}/${LXPLUS_OUTDIR}
0036
0037
0038 if [[ "${afs_or_eos}" == "afs" ]]
0039 then
0040 echo "Unpacking tarball and executing remotely: ./makereadable.sh ${dir}"
0041 SSHO ${LXPLUS_HOST} bash -c "'
0042 cd ${LXPLUS_WORKDIR}/${LXPLUS_OUTDIR}
0043 tar -zxvf ${tarball}
0044 ./makereadable.sh ${dir}
0045 rm -rf ${tarball}
0046 exit
0047 '"
0048 else
0049 echo "Unpacking tarball"
0050 SSHO ${LXPLUS_HOST} bash -c "'
0051 cd ${LXPLUS_WORKDIR}/${LXPLUS_OUTDIR}
0052 tar -zxvf ${tarball}
0053 rm -rf ${tarball}
0054 exit
0055 '"
0056 fi
0057
0058
0059 echo "Removing local tarball of plots"
0060 rm ${tarball}
0061
0062
0063 echo "Finished tarring and sending plots to LXPLUS!"