mirror of
https://github.com/pi-hole/pi-hole
synced 2024-11-18 14:18:15 +00:00
Generate only the information that is actually asked for
This commit is contained in:
parent
0e8fd49669
commit
b85af50d14
@ -86,18 +86,18 @@ normalOutput() {
|
|||||||
|
|
||||||
webOutput() {
|
webOutput() {
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
"-l" | "--latest" ) echo "${WEBVERSIONLATEST}";;
|
"-l" | "--latest" ) echo $(getRemoteVersion AdminLTE);;
|
||||||
"-c" | "--current" ) echo "${WEBVERSION}";;
|
"-c" | "--current" ) echo $(getLocalVersion "${WEBGITDIR}");;
|
||||||
"-h" | "--hash" ) echo "${WEBHASH}";;
|
"-h" | "--hash" ) echo $(getLocalHash "${WEBGITDIR}");;
|
||||||
* ) echo "::: Invalid Option!"; exit 1;
|
* ) echo "::: Invalid Option!"; exit 1;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
coreOutput() {
|
coreOutput() {
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
"-l" | "--latest" ) echo "${PHVERSIONLATEST}";;
|
"-l" | "--latest" ) echo $(getRemoteVersion pi-hole);;
|
||||||
"-c" | "--current" ) echo "${PHVERSION}";;
|
"-c" | "--current" ) echo $(getLocalVersion "${PHGITDIR}");;
|
||||||
"-h" | "--hash" ) echo "${PHHASH}";;
|
"-h" | "--hash" ) echo $(getLocalHash "${PHGITDIR}");;
|
||||||
* ) echo "::: Invalid Option!"; exit 1;
|
* ) echo "::: Invalid Option!"; exit 1;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@ -120,13 +120,6 @@ EOM
|
|||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
PHVERSION=$(getLocalVersion "${PHGITDIR}")
|
|
||||||
PHHASH=$(getLocalHash "${PHGITDIR}")
|
|
||||||
PHVERSIONLATEST=$(getRemoteVersion pi-hole)
|
|
||||||
WEBVERSION=$(getLocalVersion "${WEBGITDIR}")
|
|
||||||
WEBHASH=$(getLocalHash "${WEBGITDIR}")
|
|
||||||
WEBVERSIONLATEST=$(getRemoteVersion AdminLTE)
|
|
||||||
|
|
||||||
if [[ $# = 0 ]]; then
|
if [[ $# = 0 ]]; then
|
||||||
normalOutput
|
normalOutput
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user