mirror of
https://github.com/pi-hole/pi-hole
synced 2024-11-18 06:08:21 +00:00
Remove spinner, no functions here should last that long, and it masks a few potential exit avenues.
This commit is contained in:
parent
114bc13c23
commit
85b8676b8e
@ -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!"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user