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