mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +00:00
Colour Tweaks (#1549)
This commit is contained in:
parent
ec4e9780ed
commit
b3eb5c4f0e
@ -3,7 +3,7 @@
|
|||||||
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
|
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
|
||||||
# Network-wide ad blocking via your own hardware.
|
# Network-wide ad blocking via your own hardware.
|
||||||
#
|
#
|
||||||
# Switch Pi-hole subsystems to a different Github branch
|
# Switch Pi-hole subsystems to a different Github branch.
|
||||||
#
|
#
|
||||||
# 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.
|
||||||
@ -60,7 +60,7 @@ fetch_checkout_pull_branch() {
|
|||||||
cd "${directory}"
|
cd "${directory}"
|
||||||
git remote set-branches origin "${branch}" || return 1
|
git remote set-branches origin "${branch}" || return 1
|
||||||
git stash --all --quiet &> /dev/null || true
|
git stash --all --quiet &> /dev/null || true
|
||||||
git clean --force -d || true
|
git clean --quiet --force -d || true
|
||||||
git fetch --quiet || return 1
|
git fetch --quiet || return 1
|
||||||
checkout_pull_branch "${directory}" "${branch}" || return 1
|
checkout_pull_branch "${directory}" "${branch}" || return 1
|
||||||
}
|
}
|
||||||
@ -75,7 +75,7 @@ checkout_pull_branch() {
|
|||||||
|
|
||||||
oldbranch="$(git symbolic-ref HEAD)"
|
oldbranch="$(git symbolic-ref HEAD)"
|
||||||
|
|
||||||
git checkout "${branch}" || return 1
|
git checkout "${branch}" --quiet || return 1
|
||||||
|
|
||||||
if [[ "$(git diff "${oldbranch}" | grep -c "^")" -gt "0" ]]; then
|
if [[ "$(git diff "${oldbranch}" | grep -c "^")" -gt "0" ]]; then
|
||||||
update="true"
|
update="true"
|
||||||
@ -84,7 +84,7 @@ checkout_pull_branch() {
|
|||||||
git_pull=$(git pull || return 1)
|
git_pull=$(git pull || return 1)
|
||||||
|
|
||||||
if [[ "$git_pull" == *"up-to-date"* ]]; then
|
if [[ "$git_pull" == *"up-to-date"* ]]; then
|
||||||
echo -e "\n ${INFO} $(git pull)"
|
echo -e " ${INFO} $(git pull)"
|
||||||
else
|
else
|
||||||
echo -e "$git_pull\n"
|
echo -e "$git_pull\n"
|
||||||
fi
|
fi
|
||||||
@ -143,13 +143,15 @@ checkout() {
|
|||||||
if [[ "${1}" == "dev" ]] ; then
|
if [[ "${1}" == "dev" ]] ; then
|
||||||
# Shortcut to check out development branches
|
# Shortcut to check out development branches
|
||||||
echo -e " ${INFO} Shortcut \"dev\" detected - checking out development / devel branches..."
|
echo -e " ${INFO} Shortcut \"dev\" detected - checking out development / devel branches..."
|
||||||
echo -e " ${INFO} Pi-hole core"
|
echo ""
|
||||||
|
echo -e " ${INFO} Pi-hole Core"
|
||||||
fetch_checkout_pull_branch "${PI_HOLE_FILES_DIR}" "development" || { echo " ${CROSS} Unable to pull Core developement branch"; exit 1; }
|
fetch_checkout_pull_branch "${PI_HOLE_FILES_DIR}" "development" || { echo " ${CROSS} Unable to pull Core developement branch"; exit 1; }
|
||||||
if [[ ${INSTALL_WEB} == "true" ]]; then
|
if [[ ${INSTALL_WEB} == "true" ]]; then
|
||||||
|
echo ""
|
||||||
echo -e " ${INFO} Web interface"
|
echo -e " ${INFO} Web interface"
|
||||||
fetch_checkout_pull_branch "${webInterfaceDir}" "devel" || { echo " ${CROSS} Unable to pull Web development branch"; exit 1; }
|
fetch_checkout_pull_branch "${webInterfaceDir}" "devel" || { echo " ${CROSS} Unable to pull Web development branch"; exit 1; }
|
||||||
fi
|
fi
|
||||||
echo -e " ${TICK} Pi-hole core"
|
#echo -e " ${TICK} Pi-hole Core"
|
||||||
elif [[ "${1}" == "master" ]] ; then
|
elif [[ "${1}" == "master" ]] ; then
|
||||||
# Shortcut to check out master branches
|
# Shortcut to check out master branches
|
||||||
echo -e " ${INFO} Shortcut \"master\" detected - checking out master branches..."
|
echo -e " ${INFO} Shortcut \"master\" detected - checking out master branches..."
|
||||||
@ -159,7 +161,7 @@ checkout() {
|
|||||||
echo -e " ${INFO} Web interface"
|
echo -e " ${INFO} Web interface"
|
||||||
fetch_checkout_pull_branch "${webInterfaceDir}" "master" || { echo " ${CROSS} Unable to pull Web master branch"; exit 1; }
|
fetch_checkout_pull_branch "${webInterfaceDir}" "master" || { echo " ${CROSS} Unable to pull Web master branch"; exit 1; }
|
||||||
fi
|
fi
|
||||||
echo -e " ${TICK} Web interface"
|
#echo -e " ${TICK} Web Interface"
|
||||||
|
|
||||||
elif [[ "${1}" == "core" ]] ; then
|
elif [[ "${1}" == "core" ]] ; then
|
||||||
str="Fetching branches from ${piholeGitUrl}"
|
str="Fetching branches from ${piholeGitUrl}"
|
||||||
|
@ -10,10 +10,7 @@
|
|||||||
# 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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
|
|
||||||
readonly ADMIN_INTERFACE_GIT_URL="https://github.com/pi-hole/AdminLTE.git"
|
readonly ADMIN_INTERFACE_GIT_URL="https://github.com/pi-hole/AdminLTE.git"
|
||||||
readonly ADMIN_INTERFACE_DIR="/var/www/html/admin"
|
readonly ADMIN_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"
|
||||||
@ -82,7 +79,6 @@ GitCheckUpdateAvail() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
FTLcheckUpdate() {
|
FTLcheckUpdate() {
|
||||||
|
|
||||||
local FTLversion
|
local FTLversion
|
||||||
FTLversion=$(/usr/bin/pihole-FTL tag)
|
FTLversion=$(/usr/bin/pihole-FTL tag)
|
||||||
local FTLlatesttag
|
local FTLlatesttag
|
||||||
|
@ -212,7 +212,7 @@ update_repo() {
|
|||||||
# Pull the latest commits
|
# Pull the latest commits
|
||||||
echo -ne " ${INFO} ${str}..."
|
echo -ne " ${INFO} ${str}..."
|
||||||
git stash --all --quiet &> /dev/null || true # Okay for stash failure
|
git stash --all --quiet &> /dev/null || true # Okay for stash failure
|
||||||
git clean --force -d || true # Okay for already clean directory
|
git clean --quiet --force -d || true # Okay for already clean directory
|
||||||
git pull --quiet &> /dev/null || return $?
|
git pull --quiet &> /dev/null || return $?
|
||||||
echo -e "${OVER} ${TICK} ${str}"
|
echo -e "${OVER} ${TICK} ${str}"
|
||||||
cd "${curdir}" &> /dev/null || return 1
|
cd "${curdir}" &> /dev/null || return 1
|
||||||
|
Loading…
Reference in New Issue
Block a user