Colour Tweaks (#1549)

This commit is contained in:
Adam Warner 2017-07-01 13:08:17 +01:00 committed by WaLLy3K
parent ec4e9780ed
commit b3eb5c4f0e
3 changed files with 16 additions and 18 deletions

View file

@ -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
}
@ -75,7 +75,7 @@ checkout_pull_branch() {
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"
@ -84,7 +84,7 @@ checkout_pull_branch() {
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
@ -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,7 +161,7 @@ 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}"

View file

@ -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

View file

@ -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