From 4e4deba4b4b305b097bd5406b671e3b84a77ebb5 Mon Sep 17 00:00:00 2001 From: gretchen Date: Mon, 18 Nov 2019 16:12:36 -0800 Subject: Load a file on norns --- norns_load | 17 +++++++++++++++++ norns_upload | 4 +--- 2 files changed, 18 insertions(+), 3 deletions(-) mode change 100644 => 100755 norns_load diff --git a/norns_load b/norns_load old mode 100644 new mode 100755 index 05a7907..f68f457 --- a/norns_load +++ b/norns_load @@ -1,2 +1,19 @@ #!/bin/bash +if [[ $# -ne 2 ]]; then + echo "Usage: $0 project filename" + exit 1 +fi + +HOST="${NORNS:-norns.local}" +BASE="code/" +PROJECT="$1" +FILE="$2" + +FILE="$BASE$PROJECT/$2" +ESCAPED="$(sed 's/"/\\"/g' <<<"$FILE")" + +norns_shell "ws://$HOST:5555" <