Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I wrote a nice script to go along with this #65

Open
taybart opened this issue Jan 4, 2017 · 2 comments
Open

I wrote a nice script to go along with this #65

taybart opened this issue Jan 4, 2017 · 2 comments

Comments

@taybart
Copy link

taybart commented Jan 4, 2017

#!/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! 😄

@kmpm
Copy link
Owner

kmpm commented Jun 13, 2017

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

@taybart
Copy link
Author

taybart commented Jun 13, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants