Skip to content

Commit

Permalink
adding pplacer install script
Browse files Browse the repository at this point in the history
  • Loading branch information
crosenth committed May 23, 2024
1 parent 28c900f commit 137baee
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docker/install_pplacer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

bin=/usr/local/bin

# install pplacer and accompanying python scripts
PPLACER_BUILD=1.1.alpha19
PPLACER_DIR=pplacer-Linux-v${PPLACER_BUILD}
PPLACER_ZIP=${PPLACER_DIR}.zip
PPLACER_GH="https://github.com/matsen/pplacer"

pplacer_is_installed(){
$bin/pplacer --version 2> /dev/null | grep -q "$PPLACER_BUILD"
}

if pplacer_is_installed; then
echo -n "pplacer is already installed: "
$bin/pplacer --version
else
mkdir -p src && \
(cd src && \
wget -nc --quiet $PPLACER_GH/releases/download/v$PPLACER_BUILD/$PPLACER_ZIP && \
unzip -o $PPLACER_ZIP && \
cp $PPLACER_DIR/{pplacer,guppy,rppr} $bin)
# confirm that we have installed the requested build
if ! pplacer_is_installed; then
echo -n "Error: you requested pplacer build $PPLACER_BUILD "
echo "but $($venv/bin/pplacer --version) was installed."
echo "Try removing src/$PPLACER_ZIP first."
exit 1
fi
fi

0 comments on commit 137baee

Please sign in to comment.