Path: blob/main/bin/data_libarary_download.sh
1677 views
#!/bin/bash1set -e23# set API key and galaxy instance45API_KEY=${GALAXY_DEFAULT_ADMIN_KEY:-fakekey}6galaxy_instance="http://localhost:8080"78# setting up conda9GALAXY_CONDA_PREFIX=/tool_deps/_conda export PATH=$GALAXY_CONDA_PREFIX/bin/:$PATH1011if [ "$1" = '-d' ];12then13if [ "$(head -n 1 /tutorials/data-library_all.yaml)" != "{}" ];14then15echo "Starting Galaxy in the background"16#this is needed to use ephermeris17startup &18galaxy-wait -g $galaxy_instance19echo "Downloading data from data-library_all.yaml"20setup-data-libraries -i '/tutorials/data-library_all.yaml' -g $galaxy_instance -a $API_KEY -v21#because galaxy runs in the background, it stops running after the data is downloaded. A second startupcommand is needed:22startup23else24echo "No data libraries to install"25echo "Starting Galaxy"26startup27fi2829else30echo "Use '-d' parameter to download tutorial data."31echo "Starting Galaxy"32startup33fi3435