Skip to content

Commit

Permalink
planemo setup script
Browse files Browse the repository at this point in the history
  • Loading branch information
neoformit committed Nov 9, 2023
1 parent c30286a commit 65c9b05
Showing 1 changed file with 31 additions and 11 deletions.
42 changes: 31 additions & 11 deletions training/workshops/incob/planemo_setup_unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,46 @@ if [[ "$1" = @("-h"|"--help") ]]; then
exit 0
fi

printf "\nThis script will download and build Galaxy release 23.1, and configure planemo to use it.\n"
read -p "Continue? [y/n] " -n 1 -r
echo ""

if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Aborting"
exit 1
fi

cd ~/.planemo/

echo ""
echo "Downloading Galaxy release 23.1.1..."
echo ""
wget https://github.com/galaxyproject/galaxy/archive/refs/tags/v23.1.1.tar.gz
echo "Extracting archive..."
tar -xzf v23.1.1.tar.gz
rm v23.1.1.tar.gz
if [ ! -d v23.1.1.tar.gz ] && [ ! -d galaxy-23.1.1 ]; then
echo ""
echo "Downloading Galaxy release 23.1.1..."
echo ""
wget https://github.com/galaxyproject/galaxy/archive/refs/tags/v23.1.1.tar.gz
fi

if [ ! -d galaxy-23.1.1 ]; then
echo "Extracting archive..."
tar -xzf v23.1.1.tar.gz
rm v23.1.1.tar.gz
fi

echo ""
echo "Building Galaxy client..."
cd galaxy-23.1.1
make client
echo ""

echo ""
echo "Configuring Planemo..."
echo "" >> ~/.planemo.yml
echo "galaxy_root: $PWD/galaxy-23.1.1" >> ~/.planemo.yml
if [[ "$(grep -E '^\w?galaxy_root' ~/.planemo.yml)" != "" ]]; then
echo ""
echo "Configuring Planemo..."
echo "" >> ~/.planemo.yml
echo "galaxy_root: $PWD/galaxy-23.1.1"
echo "galaxy_root: $PWD/galaxy-23.1.1" >> ~/.planemo.yml
else
echo "galaxy_root already configured in ~/.planemo.yml. Please ensure this is correct:"
echo "$(grep -E '^\w?galaxy_root' ~/.planemo.yml)"
fi

echo ""
echo "Done"
Expand Down

0 comments on commit 65c9b05

Please sign in to comment.