diff --git a/cmd/README.md b/cmd/README.md index dced4e5e9..2a234971b 100644 --- a/cmd/README.md +++ b/cmd/README.md @@ -4,6 +4,18 @@ This directory contains directly usable tools installable via `go get periph.io/x/periph/cmd/...`. +## Push + +If you prefer to build on your workstation and push the binaries to the micro +computer, install `push` from [periph.io/x/bootstrap]( +https://github.com/periph/bootstrap) to cross compile and efficiently push via +rsync: + +``` +go get -u periph.io/x/bootstrap/cmd/push +push -host pi@raspberrypi periph.io/x/periph/cmd/... +``` + ## Recommended first use Try first `periph-info`. It will print out if any driver failed to run, for diff --git a/cmd/push.sh b/cmd/push.sh deleted file mode 100755 index c4a8b1dcd..000000000 --- a/cmd/push.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# Copyright 2016 The Periph Authors. All rights reserved. -# Use of this source code is governed under the Apache License, Version 2.0 -# that can be found in the LICENSE file. - -# Cross compiles an executable to ARM and pushes it to another host. - -set -eu -cd "$(dirname $0)" - -if [ "$#" -le 1 ]; then - echo "usage: $0 " - exit 1 -fi - -HOST="$1" -shift - -for i; do - NAME="${i%/}" - echo "- Building: $NAME" - cd "./$NAME" - GOOS=linux GOARCH=arm go test -i . - time GOOS=linux GOARCH=arm go build . - echo "" - echo -n "- Copying: " - time rsync -v --compress "$NAME" "$HOST:${NAME}" - echo "" - rm "$NAME" - cd .. -done