node-red / linux-installers

Node-RED install scripts for various flavours of Linux
Apache License 2.0
94 stars 63 forks source link

Run the script without any questions? #9

Closed TinajaLabs closed 3 years ago

TinajaLabs commented 3 years ago

Adding this to the case statement for the options makes the script a run unimpeded and automatable. With this change, I can run this in ansible.

Change this:

      --confirm-pi)
        CONFIRM_PI="y"
        shift
        ;;
      --nodered-version=*)
        NODERED_VERSION="${1#*=}"
        shift
        ;;

to this:

      --confirm-pi)
        CONFIRM_PI="y"
        shift
        ;;
      --skip-pi)
        CONFIRM_PI="n"
        shift
        ;;
      --nodered-version=*)
        NODERED_VERSION="${1#*=}"
        shift
        ;;

Then you can execute the command to install on Ubuntu without questions with the following:

$ ./update-nodejs-and-nodered --confirm-install --skip-pi

Perhaps there's a better approach, but this works for me.

dceejay commented 3 years ago

Thanks - will add