From 56e17d1010c8bc4f25816fa986cbacd8ed175caf Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Wed, 8 Mar 2017 13:27:48 -0800 Subject: [PATCH] Source functions and variables from basic-install.sh Signed-off-by: Dan Schaper --- advanced/Scripts/piholeCheckout.sh | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/advanced/Scripts/piholeCheckout.sh b/advanced/Scripts/piholeCheckout.sh index e32c8e06..4133facb 100644 --- a/advanced/Scripts/piholeCheckout.sh +++ b/advanced/Scripts/piholeCheckout.sh @@ -8,25 +8,15 @@ # This file is copyright under the latest version of the EUPL. # Please see LICENSE file for your rights under this license. +readonly PI_HOLE_FILES_DIR="/etc/.pihole" +PH_TEST=true source ${PI_HOLE_FILES_DIR}/automated\ install/basic-install.sh + readonly WEB_INTERFACE_GIT_URL="https://github.com/pi-hole/AdminLTE.git" readonly WEB_INTERFACE_DIR="/var/www/html/admin" 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, return the value - local directory="${1}" - local curdir - local rc - curdir="${PWD}" - cd "${directory}" || return 1 - # Capture any possible output - git status --short &> /dev/null - rc=$? - cd "${curdir}" || return 1 - return $rc -} +# is_repo() sourced from basic-install.sh fully_fetch_repo() { # Add upstream branches to shallow clone