@@ -3130,30 +3130,30 @@ Signed-By: /etc/apt/keyrings/dietpi-adoptium.asc"
31303130 # Deps (verified 2025-10-22): https://github.com/MichaIng/DietPi/issues/3614, https://dietpi.com/forum/t/24574
31313131 (( $G_HW_ARCH == 1 )) || aDEPS=('libatomic1')
31323132
3133- installed_ver=""
3134- if command -v node &> /dev/null; then
3135- installed_ver=$(node -v)
3136- echo "Node.js $installed_ver is installed"
3137- fi
3138-
3139- latest_ver=$(curl -sSf https://nodejs.org/dist/index.tab | awk '$3 ~ /linux-/ {print $1}' | sort -V | tail -1)
3140- echo "Latest available Node.js version: $latest_ver"
3141-
3142- if [[ "$installed_ver" != "$latest_ver" ]]; then
3143- echo "Installing Node.js $latest_ver …"
3144-
3145- # Download installer
3146- Download_Install 'https://raw.githubusercontent.com/MichaIng/nodejs-linux-installer/master/node-install.sh'
3147- G_EXEC chmod +x node-install.sh
3148-
3149- # ARMv6/RISC-V: Use unofficial builds to get the latest version: https://github.com/MichaIng/nodejs-linux-installer/pull/2, https://github.com/MichaIng/nodejs-linux-installer/commit/cd952fe
3150- local options=()
3151- (( $G_HW_ARCH == 1 || $G_HW_ARCH == 11 )) && options=('-u')
3152- G_EXEC_OUTPUT=1 G_EXEC ./node-install.sh "${options[@]}"
3153- G_EXEC rm node-install.sh
3154- else
3155- echo "Node.js is up-to-date ($installed_ver) → installation skipped"
3156- fi
3133+ installed_ver=""
3134+ if command -v node &> /dev/null; then
3135+ installed_ver=$(node -v)
3136+ echo "Node.js $installed_ver is installed"
3137+ fi
3138+
3139+ latest_ver=$(curl -sSf https://nodejs.org/dist/index.tab | awk '$3 ~ /linux-/ {print $1}' | sort -V | tail -1)
3140+ echo "Latest available Node.js version: $latest_ver"
3141+
3142+ if [[ "$installed_ver" != "$latest_ver" ]]; then
3143+ echo "Installing Node.js $latest_ver …"
3144+
3145+ # Download installer
3146+ Download_Install 'https://raw.githubusercontent.com/MichaIng/nodejs-linux-installer/master/node-install.sh'
3147+ G_EXEC chmod +x node-install.sh
3148+
3149+ # ARMv6/RISC-V: Use unofficial builds to get the latest version: https://github.com/MichaIng/nodejs-linux-installer/pull/2, https://github.com/MichaIng/nodejs-linux-installer/commit/cd952fe
3150+ local options=()
3151+ (( $G_HW_ARCH == 1 || $G_HW_ARCH == 11 )) && options=('-u')
3152+ G_EXEC_OUTPUT=1 G_EXEC ./node-install.sh "${options[@]}"
3153+ G_EXEC rm node-install.sh
3154+ else
3155+ echo "Node.js is up-to-date ($installed_ver) → installation skipped"
3156+ fi
31573157 fi
31583158
31593159 if To_Install 130 # Python 3
0 commit comments