Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pi-hole/pi-hole.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDL6ER <dl6er@dl6er.de>2017-03-04 16:08:11 +0300
committerDL6ER <dl6er@dl6er.de>2017-03-04 16:08:11 +0300
commitb85af50d14381dc7eab4e0688af44baba8fd7f3d (patch)
treed83df73846d638c1176b8f78499608308783b214 /advanced/Scripts/version.sh
parent0e8fd49669e5b5018439597585da424b516f9f57 (diff)
Generate only the information that is actually asked for
Diffstat (limited to 'advanced/Scripts/version.sh')
-rwxr-xr-xadvanced/Scripts/version.sh19
1 files changed, 6 insertions, 13 deletions
diff --git a/advanced/Scripts/version.sh b/advanced/Scripts/version.sh
index 68e84900..5674bce1 100755
--- a/advanced/Scripts/version.sh
+++ b/advanced/Scripts/version.sh
@@ -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