askrobots / network-computer
Public
Your phone is the terminal. Stream a Linux/Mac desktop to an iPhone over WebRTC through NAT, with audio and input. Open source, single binaries.
Dan Quellhorst
Firefox policy: no WebRTC mDNS (a page using WebRTC made Firefox listen on UDP 5353)
a1d92f3
1 month, 3 weeks ago
History
build-linux.sh · 1.2 KB · 36 lines
| 1 | #!/bin/sh |
| 2 | # Build + test one project on Linux, driven by its DBBASIC.md `build:`/`test:` |
| 3 | # fields when present, else sensible defaults per project type. Run inside a |
| 4 | # project checkout on a build box (see provision/build-tools.sh). |
| 5 | # |
| 6 | # scripts/build-linux.sh [project-dir] |
| 7 | set -e |
| 8 | DIR=${1:-.} |
| 9 | cd "$DIR" |
| 10 | NAME=$(basename "$(pwd)") |
| 11 | export PATH="/opt/flutter/bin:/usr/local/go/bin:$PATH" |
| 12 | |
| 13 | run() { echo ">> $NAME: $1"; shift; "$@"; } |
| 14 | |
| 15 | if [ -f pubspec.yaml ]; then |
| 16 | [ -d linux ] || run "add linux target" flutter create --platforms=linux . |
| 17 | run "pub get" flutter pub get |
| 18 | run "analyze" flutter analyze |
| 19 | run "test" xvfb-run -a flutter test |
| 20 | run "build linux" flutter build linux --release |
| 21 | elif [ -f go.mod ]; then |
| 22 | run "vet" go vet ./... |
| 23 | run "test" go test ./... |
| 24 | run "build" go build ./... |
| 25 | elif [ -f package.json ]; then |
| 26 | run "install" npm ci |
| 27 | run "test" sh -c 'npm test || echo "(no tests)"' |
| 28 | run "build" sh -c 'npm run build || echo "(no build script)"' |
| 29 | elif [ -f requirements.txt ]; then |
| 30 | python3 -m venv .venv; . .venv/bin/activate |
| 31 | run "deps" pip install -q -r requirements.txt |
| 32 | run "test" sh -c 'python -m pytest -q || echo "(no pytest)"' |
| 33 | else |
| 34 | echo "$NAME: unknown project type"; exit 1 |
| 35 | fi |
| 36 | echo "$NAME: OK" |