From 8edc9ad82da1cd432d1ed1229013bb826ce73332 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Tue, 17 Mar 2015 16:08:09 -0400 Subject: [PATCH] Modified Makefile --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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'