# run job scripts within the tool outputs directory
cd ${REPORT_FILES_PATH}
mkdir download_dir

#========== build and run bdss-download.sh script ============
echo 'for u in $(echo $X_u | sed "s/,/ /g");' > bdss-download.sh
echo 'do' >> bdss-download.sh
echo '  bdss transfer --destination download_dir -u $u' >> bdss-download.sh
echo 'done' >> bdss-download.sh


echo 'export PATH=/main/sites/galaxy/galaxy/tools/_conda/bin:$PATH'
sh bdss-download.sh
