All tabs now spaced

This commit is contained in:
Dan Schaper 2016-11-02 05:49:33 -07:00
parent 8dc9143b34
commit 93d91353a1

View file

@ -20,7 +20,7 @@ readonly PI_HOLE_GIT_URL="https://github.com/pi-hole/pi-hole.git"
readonly PI_HOLE_FILES_DIR="/etc/.pihole" readonly PI_HOLE_FILES_DIR="/etc/.pihole"
is_repo() { 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}" local directory="${1}"
cd "${directory}" &> /dev/null || false cd "${directory}" &> /dev/null || false
git status --short &> /dev/null git status --short &> /dev/null
@ -46,24 +46,24 @@ make_repo() {
} }
update_repo() { update_repo() {
# Pull the latest commits # Pull the latest commits
echo -n "::: Updating repo in $1..." echo -n "::: Updating repo in $1..."
cd "${1}" || exit 1 cd "${1}" || exit 1
git stash -q > /dev/null || exit 1 git stash -q > /dev/null || exit 1
git pull -q > /dev/null || exit 1 git pull -q > /dev/null || exit 1
echo " done!" echo " done!"
} }
getGitFiles() { getGitFiles() {
# Setup git repos for directory and repository passed # Setup git repos for directory and repository passed
# as arguments 1 and 2 # as arguments 1 and 2
echo ":::" echo ":::"
echo "::: Checking for existing repository..." echo "::: Checking for existing repository..."
if is_repo "${1}"; then if is_repo "${1}"; then
update_repo "${1}" update_repo "${1}"
else else
make_repo "${1}" "${2}" make_repo "${1}" "${2}"
fi fi
} }
main() { main() {