diff --git a/scripts/getm3fs.sh b/scripts/getm3fs similarity index 77% rename from scripts/getm3fs.sh rename to scripts/getm3fs index ea4efb1..85c0e36 100755 --- a/scripts/getm3fs.sh +++ b/scripts/getm3fs @@ -40,24 +40,10 @@ if [ -z "${ARCH}" ]; then esac fi -# # Fetch latest version -# if [ "m${VERSION}" = "m" ]; then -# VERSION="$(curl -sL https://api.github.com/repos/open3fs/m3fs/releases | -# grep -o 'download/v[0-9]*.[0-9]*.[0-9]*/' | -# sort --version-sort | -# tail -1 | awk -F'/' '{ print $2}')" -# VERSION="${VERSION##*/}" -# fi +VERSION=$(basename $(curl -s -L -I -o /dev/null -w '%{url_effective}' "https://github.com/open3fs/m3fs/releases/latest")) +echo "The latest version of m3fs is ${VERSION}" -# if [ "m${VERSION}" = "m" ]; then -# echo "Unable to get latest version of m3fs. Set VERSION env var and re-run. For example: export VERSION=v1.0.0" -# echo "" -# exit -# fi - -VERSION="v0.2.0" DOWNLOAD_URL="https://artifactory.open3fs.com/m3fs/m3fs_${VERSION}_${ARCH}.tar.gz" - echo "" echo "Downloading m3fs ${VERSION} from ${DOWNLOAD_URL} ..." echo ""