Source functions and variables from basic-install.sh

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
Dan Schaper 2017-03-08 13:27:48 -08:00
parent d2ab0694b7
commit 56e17d1010
No known key found for this signature in database
GPG Key ID: 572E999E385B7BFC
1 changed files with 4 additions and 14 deletions

View File

@ -8,25 +8,15 @@
# This file is copyright under the latest version of the EUPL. # This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license. # 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_GIT_URL="https://github.com/pi-hole/AdminLTE.git"
readonly WEB_INTERFACE_DIR="/var/www/html/admin" readonly WEB_INTERFACE_DIR="/var/www/html/admin"
readonly PI_HOLE_GIT_URL="https://github.com/pi-hole/pi-hole.git" 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}" # is_repo() sourced from basic-install.sh
cd "${directory}" || return 1
# Capture any possible output
git status --short &> /dev/null
rc=$?
cd "${curdir}" || return 1
return $rc
}
fully_fetch_repo() { fully_fetch_repo() {
# Add upstream branches to shallow clone # Add upstream branches to shallow clone