From 1cab29d6617d7317c2ae195bd9fa92ef0e02f9f6 Mon Sep 17 00:00:00 2001 From: Hermann Lienstromberg Date: Tue, 6 Jun 2023 10:37:16 +0200 Subject: [PATCH] update.sh - chek version before update --- scripts/update.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/update.sh b/scripts/update.sh index 4debd33..1c78ffc 100644 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -33,6 +33,16 @@ if [ -z "${LATEST_TAG}" ]; then fi echo -e " Found latest version : ${Cyan} ${LATEST_TAG} ${NC}" +# Checking to see if EpicPrefill is already up to date +if [ -f ./EpicPrefill ]; then + CURRENT_VERSION=$(./EpicPrefill --version) + + if [ "${CURRENT_VERSION}" == "v${LATEST_TAG}" ]; then + echo -e "${Yellow} Already up to date !${NC}" + exit + fi +fi + # Downloading latest version echo -e "${Yellow} Downloading... ${NC}" DOWNLOAD_URL="https://github.com/tpill90/epic-lancache-prefill/releases/download/v${LATEST_TAG}/EpicPrefill-${LATEST_TAG}-linux-x64.zip" @@ -48,4 +58,4 @@ chmod +x EpicPrefill update.sh # Cleanup rm EpicPrefill-${LATEST_TAG}-linux-x64.zip -echo -e " ${Cyan} Complete! ${NC}" \ No newline at end of file +echo -e " ${Cyan} Complete! ${NC}"