nodemcu-uploader icon indicating copy to clipboard operation
nodemcu-uploader copied to clipboard

I wrote a nice script to go along with this

Open taybart opened this issue 8 years ago • 2 comments

#!/bin/bash

if hash nodemcu-uploader 2>/dev/null; then
  if [[ -z $1 ]]; then
    echo "Usage: [sudo] ./esp_tool.sh DEVICE"
  else
    port=$1
    clear
    while IFS="" read -r -e -d $'\n' -p '$ ' commands; do
      history -s "$commands"
      nodemcu-uploader --port $port $commands
    done
  fi
else
  echo "Please install nodemcu-uploader to use this script."
  echo "$ pip install nodemcu-uploader"
fi

It just is run one time and allows you to run commands multiple times. It has history so you can use ^P or the up/down arrows to scroll through your history.

If you like it, maybe put it in the repo! 😄

taybart avatar Jan 04 '17 22:01 taybart

My guess is that this file should be named esp_tool.sh. Is that correct?

kmpm avatar Jun 13 '17 18:06 kmpm

Yeah, it really doesn't matter haha. I forgot to take that out. Whatever you want!

taybart avatar Jun 13 '17 19:06 taybart