From f38912a0c922709a3cb5f7e256fd466dc8abaade Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Thu, 27 Jul 2017 21:33:41 +0100 Subject: [PATCH 1/3] - Correctly overwrite ${INFO} boxes with ${CROSS} etc - Notify user that branch has been changed Signed-off-by: Adam Warner --- advanced/Scripts/piholeCheckout.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/advanced/Scripts/piholeCheckout.sh b/advanced/Scripts/piholeCheckout.sh index f214d2ce..1f784cbe 100644 --- a/advanced/Scripts/piholeCheckout.sh +++ b/advanced/Scripts/piholeCheckout.sh @@ -171,7 +171,11 @@ checkout_pull_branch() { oldbranch="$(git symbolic-ref HEAD)" + str="Switching to branch: ${branch}" + echo -ne " ${INFO} $str" git checkout "${branch}" --quiet || return 1 + echo -e "${OVER} ${TICK} $str" + if [[ "$(git diff "${oldbranch}" | grep -c "^")" -gt "0" ]]; then update="true" @@ -180,7 +184,7 @@ checkout_pull_branch() { git_pull=$(git pull || return 1) if [[ "$git_pull" == *"up-to-date"* ]]; then - echo -e " ${INFO} $(git pull)" + echo -e " ${INFO} ${git_pull}" else echo -e "$git_pull\\n" fi @@ -271,7 +275,7 @@ checkout() { str="Fetching branches from ${piholeGitUrl}" echo -ne " ${INFO} $str" if ! fully_fetch_repo "${PI_HOLE_FILES_DIR}" ; then - echo -e " ${CROSS} $str" + echo -e "${OVER} ${CROSS} $str" exit 1 fi corebranches=($(get_available_branches "${PI_HOLE_FILES_DIR}")) @@ -298,7 +302,7 @@ checkout() { str="Fetching branches from ${webInterfaceGitUrl}" echo -ne " ${INFO} $str" if ! fully_fetch_repo "${webInterfaceDir}" ; then - echo -e " ${CROSS} $str" + echo -e "${OVER} ${CROSS} $str" exit 1 fi webbranches=($(get_available_branches "${webInterfaceDir}")) From d90489b31d074630fb99e30d763e5a0707eb1424 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Thu, 27 Jul 2017 22:21:25 +0100 Subject: [PATCH 2/3] Include branch we're switching from Signed-off-by: Adam Warner --- advanced/Scripts/piholeCheckout.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Scripts/piholeCheckout.sh b/advanced/Scripts/piholeCheckout.sh index 1f784cbe..9e97c69c 100644 --- a/advanced/Scripts/piholeCheckout.sh +++ b/advanced/Scripts/piholeCheckout.sh @@ -171,7 +171,7 @@ checkout_pull_branch() { oldbranch="$(git symbolic-ref HEAD)" - str="Switching to branch: ${branch}" + str="Switching to branch: '${branch}' from '${oldbranch}'" echo -ne " ${INFO} $str" git checkout "${branch}" --quiet || return 1 echo -e "${OVER} ${TICK} $str" From 2f36acae4969c14a9c4f8a66e0ead3de14984d5d Mon Sep 17 00:00:00 2001 From: WaLLy3K Date: Wed, 23 Aug 2017 11:51:16 +1000 Subject: [PATCH 3/3] Remove errornous space --- automated install/basic-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 4047502b..4fc94837 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1216,7 +1216,7 @@ install_dependent_packages() { if command -v debconf-apt-progress &> /dev/null; then # For each package, for i in "${argArray1[@]}"; do - echo -ne " ${INFO} Checking for $i..." + echo -ne " ${INFO} Checking for $i..." # if dpkg-query -W -f='${Status}' "${i}" 2>/dev/null | grep "ok installed" &> /dev/null; then # @@ -1243,7 +1243,7 @@ install_dependent_packages() { # Install Fedora/CentOS packages for i in "${argArray1[@]}"; do - echo -ne " ${INFO} Checking for $i..." + echo -ne " ${INFO} Checking for $i..." # if ${PKG_MANAGER} -q list installed "${i}" &> /dev/null; then echo -e "${OVER} ${TICK} Checking for $i"