Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
Dan Schaper 2016-12-24 11:41:42 -08:00
parent e647efd471
commit 68c17b26dc
No known key found for this signature in database
GPG key ID: 572E999E385B7BFC

View file

@ -22,13 +22,15 @@ readonly PI_HOLE_FILES_DIR="/etc/.pihole"
is_repo() {
# Use git to check if directory is currently under VCS, return the value
local directory="${1}"
local curdir
local rc
curdir=$PWD
cd $directory
curdir="${PWD}"
cd "${directory}" || { echo "Unable to change to ${directory}, exiting."; exit 1; }
git status --short &> /dev/null
rc=$?
cd $curdir
return $rc
cd "${curdir}" || { echo "Unable to change to ${curdir}, exiting."; exit 1; }
return "${rc}"
}
prep_repo() {