File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ 1.5.8+4
Original file line number Diff line number Diff line change @@ -50,8 +50,8 @@ case "$1" in
5050 info)
5151 echo " Info: <center><a href=\" https://mosquitto.org/\" target=\" _blank\" ><img width=\" 240\" src=" /addons/mosquitto/mosquitto-text-side-28.png" ></a></center>"
5252 echo " Name: Mosquitto"
53- echo " Version: 1.5.8+3 "
54- echo " Update: /addons/mosquitto/update_check .cgi"
53+ echo " Version: $( cat ${ADDON_DIR} /VERSION ) "
54+ echo " Update: /addons/mosquitto/update-check .cgi"
5555 echo " Operations: uninstall restart"
5656 ;;
5757
Original file line number Diff line number Diff line change 1+ # !/bin/tclsh
2+
3+ set checkURL " https://raw.githubusercontent.com/homematic-community/ccu-addon-mosquitto/master/VERSION"
4+ set downloadURL " https://github.com/homematic-community/ccu-addon-mosquitto/releases/latest"
5+
6+ catch {
7+ set input $env(QUERY_STRING)
8+ set pairs [split $input &]
9+ foreach pair $pairs {
10+ if {$pair == " cmd=download" } {
11+ set cmd " download"
12+ break
13+ }
14+ }
15+ }
16+
17+ if { [info exists cmd ] && $cmd == " download" } {
18+ puts -nonewline " Content-Type: text/html; charset=utf-8\r\n\r\n "
19+ puts -nonewline " <html><head><meta http-equiv='refresh' content='0; url=$downloadURL ' /></head><body></body></html>"
20+ } else {
21+ puts -nonewline " Content-Type: text/plain; charset=utf-8\r\n\r\n "
22+ catch {
23+ set newversion [ exec /usr/bin/wget -qO- --no-check-certificate $checkURL ]
24+ }
25+ if { [info exists newversion] } {
26+ puts $newversion
27+ } else {
28+ puts " n/a"
29+ }
30+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -5,20 +5,20 @@ BUILD_DIR=`cd ${0%/*} && pwd -P`
55ADDON_FILES=$BUILD_DIR /addon_files
66ADDON_TMP=$BUILD_DIR /addon_tmp
77
8- mkdir $ADDON_TMP 2> /dev/null || rm -r $ADDON_TMP /*
8+ rm -rf $ADDON_TMP
9+ mkdir $ADDON_TMP
910
1011echo " copying files to tmp dir..."
1112cp -r $ADDON_FILES /* $ADDON_TMP /
13+ cp VERSION $ADDON_TMP /mosquitto/
1214
1315cd $BUILD_DIR
1416
15-
16- ADDON_FILE=mosquitto-1.5.8+3.tar.gz
17+ ADDON_FILE=mosquitto-$( cat VERSION) .tar.gz
1718echo " compressing addon package $ADDON_FILE ..."
1819
1920mkdir $BUILD_DIR /dist 2> /dev/null
2021cd $ADDON_TMP
21- cd $ADDON_TMP
2222if [[ " $OSTYPE " == " darwin" * ]]; then
2323 if [[ -f /usr/local/bin/gtar ]]; then
2424 gtar --exclude=.DS_Store --owner=root --group=root -czf $BUILD_DIR /dist/$ADDON_FILE *
2929 tar --owner=root --group=root -czf $BUILD_DIR /dist/$ADDON_FILE *
3030fi
3131cd $BUILD_DIR
32+ rm -r $ADDON_TMP
3233
3334echo " done."
You can’t perform that action at this time.
0 commit comments