-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (28 loc) · 1 KB
/
Copy pathMakefile
File metadata and controls
35 lines (28 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
VERSION := $(shell grep -m 1 version pyproject.toml | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3)
PATH := "/opt/bin:/opt/sbin:/home/root/.local/bin:/opt/bin:/opt/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
define SCRIPT
export PATH=${PATH}
if ! type pip &> /dev/null; then
if ! type opkg &> /dev/null; then
echo "Opkg not found, please install toltec"
exit 1
fi
opkg update
opkg install python3-pip
fi
pip install --force-reinstall /tmp/launcherctl-${VERSION}-py3-none-any.whl
endef
export SCRIPT
dist/launcherctl-${VERSION}-py3-none-any.whl: $(shell find launcherctl -type f)
emake build --wheel
clean:
git clean --force -dX
deploy: dist/launcherctl-${VERSION}-py3-none-any.whl
rsync dist/launcherctl-${VERSION}-py3-none-any.whl root@10.11.99.1:/tmp
install: deploy
echo -e "$$SCRIPT" | ssh root@10.11.99.1 bash -le
test: install
cat test.py \
| ssh root@10.11.99.1 \
"bash -ec 'PATH=${PATH} /opt/bin/python -u'"
.PHONY: clean install test deploy