From ee749f700fcaecb888093d6785f6140682b91f26 Mon Sep 17 00:00:00 2001 From: yubiuser Date: Sat, 7 Aug 2021 20:07:45 +0200 Subject: [PATCH] Add switching 'to...from' message to ftl checkout output (#4266) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add switching 'to...from' message to ftl checkout output Signed-off-by: Christian König * Add quotes Signed-off-by: Christian König --- advanced/Scripts/piholeCheckout.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/advanced/Scripts/piholeCheckout.sh b/advanced/Scripts/piholeCheckout.sh index 1c1b16a4..4c0a4f40 100644 --- a/advanced/Scripts/piholeCheckout.sh +++ b/advanced/Scripts/piholeCheckout.sh @@ -166,12 +166,15 @@ checkout() { checkout_pull_branch "${webInterfaceDir}" "${2}" elif [[ "${1}" == "ftl" ]] ; then local path + local oldbranch path="${2}/${binary}" + oldbranch="$(pihole-FTL -b)" if check_download_exists "$path"; then echo " ${TICK} Branch ${2} exists" echo "${2}" > /etc/pihole/ftlbranch chmod 644 /etc/pihole/ftlbranch + echo -e " ${INFO} Switching to branch: \"${2}\" from \"${oldbranch}\"" FTLinstall "${binary}" restart_service pihole-FTL enable_service pihole-FTL