diff --git a/Makefile b/Makefile index d49cc80..37d9756 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ OBJECTS=$(SOURCES:.cpp=.o) WPILIB=/var/frc/wpilib EXEC=bin/FRCUserProgram CLEANSER=rm -f +READER=$(shell which pv||which cat) all : $(OBJECTS) if [ ! -d bin ];then mkdir bin; fi @@ -19,10 +20,10 @@ clean: $(CLEANSER) $(OBJECTS) bin/FRCUserProgram deploy: - @cat bin/FRCUserProgram | ssh admin@$(REMOTEIP) '(rm /home/lvuser/FRCUserProgram) /home/lvuser/FRCUserProgram;chmod a+x /home/lvuser/FRCUserProgram' + @$(READER) bin/FRCUserProgram | ssh admin@$(REMOTEIP) '(rm /home/lvuser/FRCUserProgram) /home/lvuser/FRCUserProgram;chmod a+x /home/lvuser/FRCUserProgram' debug: - @cat bin/FRCUserProgram | ssh admin@$(REMOTEIP) '(rm /home/lvuser/FRCUserProgram) /home/lvuser/FRCUserProgram;chmod a+x /home/lvuser/FRCUserProgram;/home/lvuser/run.sh' + @$(READER) bin/FRCUserProgram | ssh admin@$(REMOTEIP) '(rm /home/lvuser/FRCUserProgram) /home/lvuser/FRCUserProgram;chmod a+x /home/lvuser/FRCUserProgram;/home/lvuser/run.sh' putkey: @test -d ~/.ssh||mkdir ~/.ssh;test -f ~/.ssh/id_rsa||ssh-keygen -t rsa -f ~/.ssh/id_rsa -b 4096 -q -N '';cat ~/.ssh/id_rsa.pub|ssh -v admin@$(REMOTEIP) 'cat >> /tmp/key;mkdir -p ~/.ssh;cat /tmp/key >> ~/.ssh/authorized_keys;rm /tmp/key'