diff --git a/contrib/updatecheck/calcversions.sh b/contrib/updatecheck/calcversions.sh index cf22c172..da502b97 100755 --- a/contrib/updatecheck/calcversions.sh +++ b/contrib/updatecheck/calcversions.sh @@ -1,5 +1,6 @@ #!/bin/sh -version=`head -n 1 VERSION` +version=`head -n 1 ../../VERSION` revision=`git describe --always` -echo "ebusd=${version}.${revision}" > versions.txt -#TODO add calculation for config files +echo "ebusd=${version},${revision}" > versions.txt +files=`find config/ -type f -or -type l` +../../src/lib/ebus/test/test_filereader $files|sed -e 's#^config/##' -e 's#^\([^ ]*\) #\1=#' -e 's# #,#g'|sort >> versions.txt diff --git a/contrib/updatecheck/index.php b/contrib/updatecheck/index.php index 67f127c4..3be24e92 100644 --- a/contrib/updatecheck/index.php +++ b/contrib/updatecheck/index.php @@ -1,8 +1,6 @@ $val['t']; + if ($newer || $v[0]!=$val['h'] || $v[1]!=$val['s']) { + if ($newer) $neweravail++; + $configs .= ', '.$k.': '.($newer?'newer':'different').' version available'; + } + } + }; + array_walk($r['l'], $func); + if (strlen($configs)>100) { + $ret .= ($neweravail?$neweravail.', newer ':', different').' configuration files available'; + } else { + $ret .= $configs; + } } echo $ret; exit;