Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Commit

Permalink
Add basic install target
Browse files Browse the repository at this point in the history
  • Loading branch information
wvengen committed Dec 26, 2016
1 parent 1121eba commit 3aaa87c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ mips/$(TARGET):


### Install on real device
# @todo install target (with HOST=... parameter)

INSTALL_FILES = \
unifi-announce-data \
Expand All @@ -105,10 +104,17 @@ INSTALL_FILES = \
shinc/common.sh \
shinc/JSON.sh

.PHONY: install

mips/egrep:
@mkdir -p mips
wget -O $@ -c https://busybox.net/downloads/binaries/latest/busybox-mips
chmod a+x $@

dist.mips.tar.gz: mips/$(TARGET) $(INSTALL_FILES) mips/egrep
tar -c -z -f $@ --transform='s/^mips\///' mips/$(TARGET) $(INSTALL_FILES) mips/egrep

install: dist.mips.tar.gz
@if [ -z "$(HOST)" ]; then echo "Usage: make install HOST=[user@]<switch ip>" 1>&2; exit 1; fi
cat dist.mips.tar.gz | ssh "$(HOST)" 'mkdir -p unifi && tar -x -z -C unifi -f -'
# @todo finish installation

0 comments on commit 3aaa87c

Please sign in to comment.