From d207deb7c2d4b545db20b3b118c9ae91305b8a7c Mon Sep 17 00:00:00 2001 From: Simon Let Date: Wed, 18 Dec 2019 14:43:24 +0100 Subject: [PATCH] draft updating to a pre-release --- scripts/rawinstall.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/rawinstall.sh b/scripts/rawinstall.sh index c9e0424..13eede9 100755 --- a/scripts/rawinstall.sh +++ b/scripts/rawinstall.sh @@ -9,9 +9,14 @@ echo echo "Looking for the latest release ..." json=$(curl --silent "https://api.github.com/repos/curusarn/resh/releases/latest") +# latest release # not very robust but we don't want any dependencies to parse to JSON tag=$(echo "$json" | grep '"tag_name":' | cut -d':' -f2 | tr -d ',' | cut -d'"' -f2) +# latest release OR pre-release +# json=$(curl --silent "https://api.github.com/repos/curusarn/resh/releases") +# tag=$(echo "$json" | grep '"tag_name":' | cut -d':' -f2 | tr -d ',' | cut -d'"' -f2 | sort --version-sort --reverse | head -n 1) + if [ ${#tag} -lt 2 ]; then echo "ERROR: Couldn't determine the latest release! (extracted git tag is too short \"${tag}\")" exit 1