From 08175c87ab1c91a471fee8a618b14686c95cd8c1 Mon Sep 17 00:00:00 2001 From: mag37 Date: Thu, 2 Feb 2023 22:02:41 +0100 Subject: [PATCH] added ugly version-check curl-check on the version in local VS raw on github to let the user know there's a new release. --- dockcheck.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dockcheck.sh b/dockcheck.sh index cd2960c..bfdc7e0 100644 --- a/dockcheck.sh +++ b/dockcheck.sh @@ -1,5 +1,10 @@ #!/bin/bash VERSION="v0.1.3" +Github="https://github.com/mag37/dockcheck" + +### Check if there's a new release of the script: +LatestRelease="$(curl -s -r 0-30 https://raw.githubusercontent.com/mag37/dockcheck/main/dockcheck.sh | sed -n "/VERSION/s/VERSION=//p" | tr -d '"')" +[ $VERSION != $LatestRelease ] && printf "New version available! Latest: $LatestRelease - Local: $VERSION \nGrab it here: $Github \n" ### Help Function: Help() {