12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
-
-
-
-
-
-
-
- HOST = iot
-
-
-
-
-
- SHELL := bash
- .ONESHELL:
- .SHELLFLAGS := -eu -o pipefail -c
- .DELETE_ON_ERROR:
- MAKEFLAGS += --warn-undefined-variables
- MAKEFLAGS += --no-builtin-rules
-
-
- ifeq ($(origin .RECIPEPREFIX), undefined)
- $(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later)
- endif
- .RECIPEPREFIX = >
-
-
-
- all: lights-telegram
-
- lights-telegram: lights-telegram.go
- > CGO_ENABLED=0 go build
-
- clean:
- > rm -rf lights-telegram
-
- upload: lights-telegram
- > ssh $(HOST) sudo systemctl stop lights-telegram
- > scp lights-telegram $(HOST):~/bin/lights-telegram/lights-telegram
- > sleep 1
- > ssh $(HOST) sudo systemctl start lights-telegram
- .PHONY: upload
-
- download:
- > scp $(HOST):~/bin/lights-telegram/config.yaml config.yaml
- .PHONY: download
|