From 93d91353a1615aaea530c0bcce818df94cabab96 Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Wed, 2 Nov 2016 05:49:33 -0700 Subject: [PATCH] All tabs now spaced --- advanced/Scripts/update.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/advanced/Scripts/update.sh b/advanced/Scripts/update.sh index 0c5e625c..ea04dc2e 100644 --- a/advanced/Scripts/update.sh +++ b/advanced/Scripts/update.sh @@ -20,7 +20,7 @@ readonly PI_HOLE_GIT_URL="https://github.com/pi-hole/pi-hole.git" readonly PI_HOLE_FILES_DIR="/etc/.pihole" is_repo() { - # Use git to check if directory is currently under VCS, do not exit if failed + # Use git to check if directory is currently under VCS, do not exit if failed local directory="${1}" cd "${directory}" &> /dev/null || false git status --short &> /dev/null @@ -46,24 +46,24 @@ make_repo() { } update_repo() { -# Pull the latest commits - echo -n "::: Updating repo in $1..." - cd "${1}" || exit 1 - git stash -q > /dev/null || exit 1 - git pull -q > /dev/null || exit 1 - echo " done!" + # Pull the latest commits + echo -n "::: Updating repo in $1..." + cd "${1}" || exit 1 + git stash -q > /dev/null || exit 1 + git pull -q > /dev/null || exit 1 + echo " done!" } getGitFiles() { - # Setup git repos for directory and repository passed - # as arguments 1 and 2 - echo ":::" - echo "::: Checking for existing repository..." - if is_repo "${1}"; then - update_repo "${1}" - else - make_repo "${1}" "${2}" - fi + # Setup git repos for directory and repository passed + # as arguments 1 and 2 + echo ":::" + echo "::: Checking for existing repository..." + if is_repo "${1}"; then + update_repo "${1}" + else + make_repo "${1}" "${2}" + fi } main() {