From 85b8676b8e817b38179ab93870b6b9b41413f295 Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Tue, 1 Nov 2016 12:16:46 -0700 Subject: [PATCH] Remove spinner, no functions here should last that long, and it masks a few potential exit avenues. --- advanced/Scripts/update.sh | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/advanced/Scripts/update.sh b/advanced/Scripts/update.sh index e682e837..e5e8766d 100644 --- a/advanced/Scripts/update.sh +++ b/advanced/Scripts/update.sh @@ -19,20 +19,6 @@ readonly WEBINTERFACEDIR="/var/www/html/admin" readonly PIHOLEGITURL="https://github.com/pi-hole/pi-hole.git" readonly PIHOLEFILESDIR="/etc/.pihole" -spinner() { - local pid=${1} - local delay=0.50 - local spinstr='/-\|' - while [ "$(ps a | awk '{print $1}' | grep "${pid}")" ]; do - local temp=${spinstr#?} - printf " [%c] " "${spinstr}" - local spinstr=${temp}${spinstr%"$temp"} - sleep ${delay} - printf "\b\b\b\b\b\b" - done - printf " \b\b\b\b" -} - getGitFiles() { # Setup git repos for directory and repository passed # as arguments 1 and 2 @@ -70,8 +56,8 @@ update_repo() { # Pull the latest commits echo -n "::: Updating repo in $1..." cd "${1}" || exit 1 - git stash -q > /dev/null & spinner $! - git pull -q > /dev/null & spinner $! + git stash -q > /dev/null || exit 1 + git pull -q > /dev/null || exit 1 echo " done!" }