diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-10-02 23:52:52 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-10-03 17:15:23 +0200 |
commit | 1d8bec95253ee8a88a85cb88be521f28b23504aa (patch) | |
tree | 5d61cd1d4f091286a4b423523bbb56b492b8022e /upload.sh | |
download | esp-playground-1d8bec95253ee8a88a85cb88be521f28b23504aa.tar.gz esp-playground-1d8bec95253ee8a88a85cb88be521f28b23504aa.tar.bz2 esp-playground-1d8bec95253ee8a88a85cb88be521f28b23504aa.tar.xz esp-playground-1d8bec95253ee8a88a85cb88be521f28b23504aa.zip |
wip of serial commands to mqtt bridge.
Diffstat (limited to 'upload.sh')
-rwxr-xr-x | upload.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/upload.sh b/upload.sh new file mode 100755 index 0000000..be9e1be --- /dev/null +++ b/upload.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -e +dir=$1; shift + +basedir=`pwd` +cmd=() +paths=() +for path in `git status --porcelain "$dir"/*.lua|sed -n 's,^.M \(.*\),\1,p'` +do + filename=`basename $path` + cmd+=("$path:$filename") + paths+=("$path") +done + +if [[ ${#cmd[@]} -gt 0 ]] +then + "$basedir/nodemcu-uploader/nodemcu-uploader.py" upload "${cmd[@]}" + git add "${paths[@]}" +fi + +echo "require('main'); main();" |