Experimente o código abaixo,
#!/bin/bash
SOF_PATH=/opt
NODE="$(curl -sL https://nodejs.org/dist/latest | grep 'armv6l.tar.gz' | cut -d'"' -f2)"
if [ ! -z "$NODE" ]; then
cd $SOF_PATH
/usr/bin/wget "https://nodejs.org/dist/latest/$NODE" >/dev/null 2>&1
/bin/tar -xzf $NODE
NODE_APP=${NODE%.tar.gz}
cd $NODE_APP/bin
NODE_VERSION='node -v'
echo "$NODE_VERSION"
cd ..
sudo cp -R * /usr/local/
fi