Patched version of install script

This commit is contained in:
2023-01-27 14:50:45 +01:00
parent f74c0bd517
commit 9f98075510

View File

@ -2,6 +2,7 @@
URL="https://go.dev/dl/" URL="https://go.dev/dl/"
OBIURL4="https://git.metabarcoding.org/lecasofts/go/obitools/-/archive/master/obitools-master.tar.gz" OBIURL4="https://git.metabarcoding.org/lecasofts/go/obitools/-/archive/master/obitools-master.tar.gz"
PREFIX="/usr/local"
# the directory of the script # the directory of the script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@ -39,7 +40,7 @@ GOURL=$(curl "${URL}${GOFILE}" \
curl "$GOURL" \ curl "$GOURL" \
| tar zxf - | tar zxf -
export PATH="$WORK_DIR/go/bin:$PATH" export PATH="$(pwd)/go/bin:$PATH"
curl "$OBIURL4" \ curl "$OBIURL4" \
| tar zxf - | tar zxf -
@ -47,4 +48,17 @@ curl "$OBIURL4" \
cd obitools-master cd obitools-master
make make
popd echo "Please enter your password for installing obitools"
sudo mkdir -p "${PREFIX}/bin"
if [[ ! "${PREFIX}/bin" || ! -d "${PREFIX}/bin" ]]; then
echo "Could not create ${PREFIX}/bin directory for installing obitools"
exit 1
fi
sudo cp build/* "${PREFIX}/bin"
popd
rm -rf "$WORK_DIR"