Syntax errors when running the install script on raspberry pi

Trying to install Node red on my Raspberry pi 4 but it gives this error:

/dev/fd/63: line 851: syntax error near unexpected token ;;' /dev/fd/63: line 851: ;;'

This is the command I'm using:
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

Thanks.

Yeah, I guess there is some editing of the script ongoing....

1 Like

A change to the script today by @dceejay (?) commenting out lines 816 to 821 has an error: The fi at line 821 should not be commented out; it leaves if at line 806 unterminated - at least if the indentation is reliable!:

    806         if [ ! -f $file ]; then
    807             echo "  - You can customise the initial settings by running:"
    808             echo " "
    809             echo "      node-red admin init"
    810             echo " "
    811             echo "  - After running Node-RED for the first time, change the ownership of the settings"
    812             echo "    file to 'root' to prevent unauthorised changes:"
    813             echo " "
    814             echo "      sudo chown root:root ~/.node-red/settings.js"
    815             echo " "
    816         # elif ! [[ $(stat --format '%G' ~/.node-red/settings.js) = "root" ]]; then
    817         #     echo "  - Change the ownership of its settings file to 'root' to prevent unauthorised changes:"
    818         #     echo ""
    819         #     echo "      sudo chown root:root ~/.node-red/settings.js"
    820         #     echo " "
    821         # fi
    822         if [ "$EUID" == "0" ]; then
    823             echo "  - Do not run Node-RED as root or an administraive account"
    824             echo " "
    825         fi
    826         echo "**********************************************************************************"

A work-around till it's fixed:
download the script, edit it and run it locally

curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered > nrscript
sed -i '821 s/# fi/fi/' nrscript
bash ./nrscript
1 Like

SORRY GUYS ! - mea culpa...

pushed fixed script.

2 Likes

Thank you guys. :+1: