Source functions and variables from basic-install.sh
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
parent
d2ab0694b7
commit
56e17d1010
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue