diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2015-10-03 17:14:41 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2015-10-03 17:15:54 +0200 |
commit | 967254d72ba5e116f3019937660c346d202af7f7 (patch) | |
tree | 20a28ea674cdca521ad51eb7df54f475b0aa602a /upload.sh | |
parent | 1d8bec95253ee8a88a85cb88be521f28b23504aa (diff) | |
download | esp-playground-967254d72ba5e116f3019937660c346d202af7f7.tar.gz esp-playground-967254d72ba5e116f3019937660c346d202af7f7.tar.bz2 esp-playground-967254d72ba5e116f3019937660c346d202af7f7.tar.xz esp-playground-967254d72ba5e116f3019937660c346d202af7f7.zip |
wip
Diffstat (limited to 'upload.sh')
-rwxr-xr-x | upload.sh | 21 |
1 files changed, 13 insertions, 8 deletions
@@ -1,22 +1,27 @@ #!/bin/bash set -e -dir=$1; shift +dir="$1"; shift -basedir=`pwd` +basedir=$(pwd) +cookie=$(cd $dir; echo $(pwd)/.cookie) cmd=() paths=() -for path in `git status --porcelain "$dir"/*.lua|sed -n 's,^.M \(.*\),\1,p'` + +for path in $(ls "$dir"/cfg-* "$dir"/*.lua) do - filename=`basename $path` - cmd+=("$path:$filename") - paths+=("$path") + if [[ $path -nt "$cookie" ]] + then + filename=`basename $path` + cmd+=("$path:$filename") + paths+=("$path") + fi done if [[ ${#cmd[@]} -gt 0 ]] then - "$basedir/nodemcu-uploader/nodemcu-uploader.py" upload "${cmd[@]}" - git add "${paths[@]}" + "$basedir/nodemcu-uploader/nodemcu-uploader.py" --baud 115200 upload "${cmd[@]}" fi +touch "$cookie" echo "require('main'); main();" |