Add the feature for update to any version
This commit is contained in:
@@ -2,6 +2,16 @@
|
||||
|
||||
set +e
|
||||
|
||||
# add the feature for update to any version
|
||||
if [ -f "/config/go2rtc.version" ]; then
|
||||
branch=`cat /config/go2rtc.version`
|
||||
echo "Update to version $branch"
|
||||
git clone --depth 1 --branch "$branch" https://github.com/AlexxIT/go2rtc \
|
||||
&& cd go2rtc \
|
||||
&& CGO_ENABLED=0 go build -ldflags "-s -w" -trimpath -o /usr/local/bin \
|
||||
&& rm -r /go2rtc && rm /config/go2rtc.version
|
||||
fi
|
||||
|
||||
# set cwd for go2rtc (for config file, Hass itegration, etc)
|
||||
cd /config
|
||||
|
||||
|
||||
Reference in New Issue
Block a user