From b12f4589f5dacf4fe210183c0900cec468132e02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Mon, 27 Feb 2023 03:32:43 +0100 Subject: [PATCH] Fix updating helper scripts after script update --- .msman/version.sh | 2 +- Makefile | 4 ++-- msman.sh | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.msman/version.sh b/.msman/version.sh index 83ddb2b..4150dbc 100644 --- a/.msman/version.sh +++ b/.msman/version.sh @@ -1,3 +1,3 @@ #!/bin/bash -EXTRA_SCRIPTS_VERSION="v1.1.7" +EXTRA_SCRIPTS_VERSION="v1.1.8" diff --git a/Makefile b/Makefile index 580bd90..d19e54b 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,8 @@ MAKEFLAGS += -s all: - CURRENT_SCRIPT_VERSION=`grep "CURRENT_SCRIPT_VERSION=" msman.sh | sed -e "s/CURRENT_SCRIPT_VERSION=//g"`; \ - EXTRA_VERSION=`grep "EXTRA_SCRIPTS_VERSION=" .msman/version.sh | sed -e "s/EXTRA_SCRIPTS_VERSION=//g"`; \ + CURRENT_SCRIPT_VERSION=`grep "CURRENT_SCRIPT_VERSION=" msman.sh | sed -e "s/CURRENT_SCRIPT_VERSION=//g" | sed '$d'`; \ + EXTRA_VERSION=`grep "EXTRA_SCRIPTS_VERSION=" .msman/version.sh | sed -e "s/EXTRA_SCRIPTS_VERSION=//g" | sed '$d'`; \ if [ "$$CURRENT_SCRIPT_VERSION" != "$$EXTRA_VERSION" ]; then \ echo "ERROR: The version in msman.sh and .msman/version.sh are not the same!"; \ echo "ERROR: Please make sure they are the same."; \ diff --git a/msman.sh b/msman.sh index 14ff6d1..ebefe8b 100755 --- a/msman.sh +++ b/msman.sh @@ -8,7 +8,7 @@ set -e # and acknowledge the original script and author. # ############################################################################################################# -CURRENT_SCRIPT_VERSION="v1.1.7" +CURRENT_SCRIPT_VERSION="v1.1.8" # -------------------------------------------------- # You shouldn't need to change anything in this file @@ -319,7 +319,7 @@ function check_self_update { read -t 15 -p "Do you want to update? [y/N] " update if [ "$update" == "y" ] || [ "$update" == "Y" ]; then self_update - CURRENT_VERSION=$LATEST_SCRIPT_VERSION + CURRENT_SCRIPT_VERSION=$LATEST_SCRIPT_VERSION check_helper_scripts bash -c "$(pwd)/msman.sh" else