From 5a23e5c13a417bc23e5aa94b55d58af365aab34b Mon Sep 17 00:00:00 2001 From: john30 Date: Sun, 5 Mar 2017 13:14:38 +0100 Subject: [PATCH] unix mode --- contrib/updatecheck/calcversions.sh | 2 +- contrib/updatecheck/index.php | 78 ++++++++++++++--------------- 2 files changed, 40 insertions(+), 40 deletions(-) mode change 100644 => 100755 contrib/updatecheck/calcversions.sh diff --git a/contrib/updatecheck/calcversions.sh b/contrib/updatecheck/calcversions.sh old mode 100644 new mode 100755 index 6640a651..cf22c172 --- a/contrib/updatecheck/calcversions.sh +++ b/contrib/updatecheck/calcversions.sh @@ -1,5 +1,5 @@ #!/bin/sh version=`head -n 1 VERSION` revision=`git describe --always` -echo "ebusd=${version}.${revision}" +echo "ebusd=${version}.${revision}" > versions.txt #TODO add calculation for config files diff --git a/contrib/updatecheck/index.php b/contrib/updatecheck/index.php index 337db8e1..67f127c4 100644 --- a/contrib/updatecheck/index.php +++ b/contrib/updatecheck/index.php @@ -1,39 +1,39 @@ -1) { - $versions[$val[0]] = explode(',', $val[1]); - } - }; - array_walk($v, $func); - } - header('Content-Type: text/plain'); - $ret = 'unknown'; - $r = @json_decode($r, true); - if (!$r || !isset($r['v'])) { - $ret = 'invalid request'; - } else { - if (isset($versions['ebusd'])) { - if ($r['v']==$versions['ebusd'][0]) { - $ret = 'OK'; - } else { - $ret = 'ebusd '.$versions['ebusd'][0].' available'; - } - } - // TODO add check for config files - } - echo $ret; - exit; -} -header('HTTP/1.1 404 Not Found'); -?> +1) { + $versions[$val[0]] = explode(',', $val[1]); + } + }; + array_walk($v, $func); + } + header('Content-Type: text/plain'); + $ret = 'unknown'; + $r = @json_decode($r, true); + if (!$r || !isset($r['v'])) { + $ret = 'invalid request'; + } else { + if (isset($versions['ebusd'])) { + if ($r['v']==$versions['ebusd'][0]) { + $ret = 'OK'; + } else { + $ret = 'ebusd '.$versions['ebusd'][0].' available'; + } + } + // TODO add check for config files + } + echo $ret; + exit; +} +header('HTTP/1.1 404 Not Found'); +?>