mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Colour Tweaks (#1549)
This commit is contained in:
parent
ec4e9780ed
commit
b3eb5c4f0e
3 changed files with 16 additions and 18 deletions
|
@ -3,7 +3,7 @@
|
|||
# (c) 2017 Pi-hole, LLC (https://pi-hole.net)
|
||||
# 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.
|
||||
# Please see LICENSE file for your rights under this license.
|
||||
|
@ -60,7 +60,7 @@ fetch_checkout_pull_branch() {
|
|||
cd "${directory}"
|
||||
git remote set-branches origin "${branch}" || return 1
|
||||
git stash --all --quiet &> /dev/null || true
|
||||
git clean --force -d || true
|
||||
git clean --quiet --force -d || true
|
||||
git fetch --quiet || return 1
|
||||
checkout_pull_branch "${directory}" "${branch}" || return 1
|
||||
}
|
||||
|
@ -74,21 +74,21 @@ checkout_pull_branch() {
|
|||
cd "${directory}" || return 1
|
||||
|
||||
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
|
||||
update="true"
|
||||
fi
|
||||
|
||||
git_pull=$(git pull || return 1)
|
||||
|
||||
|
||||
if [[ "$git_pull" == *"up-to-date"* ]]; then
|
||||
echo -e "\n ${INFO} $(git pull)"
|
||||
echo -e " ${INFO} $(git pull)"
|
||||
else
|
||||
echo -e "$git_pull\n"
|
||||
fi
|
||||
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
@ -143,13 +143,15 @@ checkout() {
|
|||
if [[ "${1}" == "dev" ]] ; then
|
||||
# Shortcut to check out development 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; }
|
||||
if [[ ${INSTALL_WEB} == "true" ]]; then
|
||||
echo ""
|
||||
echo -e " ${INFO} Web interface"
|
||||
fetch_checkout_pull_branch "${webInterfaceDir}" "devel" || { echo " ${CROSS} Unable to pull Web development branch"; exit 1; }
|
||||
fi
|
||||
echo -e " ${TICK} Pi-hole core"
|
||||
#echo -e " ${TICK} Pi-hole Core"
|
||||
elif [[ "${1}" == "master" ]] ; then
|
||||
# Shortcut to check out master branches
|
||||
echo -e " ${INFO} Shortcut \"master\" detected - checking out master branches..."
|
||||
|
@ -159,8 +161,8 @@ checkout() {
|
|||
echo -e " ${INFO} Web interface"
|
||||
fetch_checkout_pull_branch "${webInterfaceDir}" "master" || { echo " ${CROSS} Unable to pull Web master branch"; exit 1; }
|
||||
fi
|
||||
echo -e " ${TICK} Web interface"
|
||||
|
||||
#echo -e " ${TICK} Web Interface"
|
||||
|
||||
elif [[ "${1}" == "core" ]] ; then
|
||||
str="Fetching branches from ${piholeGitUrl}"
|
||||
echo -ne " ${INFO} $str"
|
||||
|
@ -196,7 +198,7 @@ checkout() {
|
|||
exit 1
|
||||
fi
|
||||
webbranches=($(get_available_branches "${webInterfaceDir}"))
|
||||
|
||||
|
||||
if [[ "${corebranches[@]}" == *"master"* ]]; then
|
||||
echo -e "${OVER} ${TICK} $str
|
||||
${INFO} ${#webbranches[@]} branches available for Web Admin"
|
||||
|
|
|
@ -10,10 +10,7 @@
|
|||
# This file is copyright under the latest version of the EUPL.
|
||||
# Please see LICENSE file for your rights under this license.
|
||||
|
||||
|
||||
|
||||
# Variables
|
||||
|
||||
readonly ADMIN_INTERFACE_GIT_URL="https://github.com/pi-hole/AdminLTE.git"
|
||||
readonly ADMIN_INTERFACE_DIR="/var/www/html/admin"
|
||||
readonly PI_HOLE_GIT_URL="https://github.com/pi-hole/pi-hole.git"
|
||||
|
@ -82,7 +79,6 @@ GitCheckUpdateAvail() {
|
|||
}
|
||||
|
||||
FTLcheckUpdate() {
|
||||
|
||||
local FTLversion
|
||||
FTLversion=$(/usr/bin/pihole-FTL tag)
|
||||
local FTLlatesttag
|
||||
|
@ -131,7 +127,7 @@ main() {
|
|||
# re-install (i.e. update) FTL
|
||||
if ${FTL_update} && ! ${core_update}; then
|
||||
echo ""
|
||||
echo -e " ${INFO} FTL out of date"
|
||||
echo -e " ${INFO} FTL out of date"
|
||||
FTLdetect
|
||||
echo ""
|
||||
fi
|
||||
|
|
|
@ -212,7 +212,7 @@ update_repo() {
|
|||
# Pull the latest commits
|
||||
echo -ne " ${INFO} ${str}..."
|
||||
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 $?
|
||||
echo -e "${OVER} ${TICK} ${str}"
|
||||
cd "${curdir}" &> /dev/null || return 1
|
||||
|
|
Loading…
Reference in a new issue