mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-25 14:20:18 +00:00
Print version details automatically if not on master
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
b333e30162
commit
c3c31a1a60
2 changed files with 10 additions and 11 deletions
|
@ -27,7 +27,13 @@ fi
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
local details
|
local details
|
||||||
details=$1
|
details=false
|
||||||
|
|
||||||
|
# Automatically show detailed information if
|
||||||
|
# at least one of the components is not on master branch
|
||||||
|
if [ ! "${CORE_BRANCH}" = "master" ] || [ ! "${WEB_BRANCH}" = "master" ] || [ ! "${FTL_BRANCH}" = "master" ] ; then
|
||||||
|
details=true
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${details}" = true ]; then
|
if [ "${details}" = true ]; then
|
||||||
echo "Core"
|
echo "Core"
|
||||||
|
@ -49,10 +55,4 @@ main() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Process options (if present)
|
main
|
||||||
case "$1" in
|
|
||||||
"-vv" ) details=true;;
|
|
||||||
* ) details=false;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
main "${details}"
|
|
||||||
|
|
5
pihole
5
pihole
|
@ -140,7 +140,7 @@ uninstallFunc() {
|
||||||
}
|
}
|
||||||
|
|
||||||
versionFunc() {
|
versionFunc() {
|
||||||
exec "${PI_HOLE_SCRIPT_DIR}"/version.sh "$@"
|
exec "${PI_HOLE_SCRIPT_DIR}"/version.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
restartDNS() {
|
restartDNS() {
|
||||||
|
@ -507,7 +507,6 @@ Options:
|
||||||
-up, updatePihole Update Pi-hole subsystems
|
-up, updatePihole Update Pi-hole subsystems
|
||||||
Add '--check-only' to exit script before update is performed.
|
Add '--check-only' to exit script before update is performed.
|
||||||
-v, version Show installed versions of Pi-hole, Web Interface & FTL
|
-v, version Show installed versions of Pi-hole, Web Interface & FTL
|
||||||
Use -vv for detailed information.
|
|
||||||
uninstall Uninstall Pi-hole from your system
|
uninstall Uninstall Pi-hole from your system
|
||||||
status Display the running status of Pi-hole subsystems
|
status Display the running status of Pi-hole subsystems
|
||||||
enable Enable Pi-hole subsystems
|
enable Enable Pi-hole subsystems
|
||||||
|
@ -530,7 +529,7 @@ fi
|
||||||
need_root=1
|
need_root=1
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
"-h" | "help" | "--help" ) helpFunc;;
|
"-h" | "help" | "--help" ) helpFunc;;
|
||||||
"-v" | "-vv" | "version" ) versionFunc "$@";;
|
"-v" | "version" ) versionFunc;;
|
||||||
"-c" | "chronometer" ) chronometerFunc "$@";;
|
"-c" | "chronometer" ) chronometerFunc "$@";;
|
||||||
"-q" | "query" ) queryFunc "$@";;
|
"-q" | "query" ) queryFunc "$@";;
|
||||||
"status" ) statusFunc "$2";;
|
"status" ) statusFunc "$2";;
|
||||||
|
|
Loading…
Reference in a new issue