diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-12-07 02:18:27 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-12-07 02:18:27 +0200 |
commit | 2bca2705e9c83010bfafc0e6debfab10f867c06d (patch) | |
tree | 9a41980c3cdb3b16b586ec80f7daf3fd23225ef4 /install.sh | |
parent | 5402530100772eb3a8db649a52ee454145ae54dc (diff) | |
download | arching-kaos-tools-2bca2705e9c83010bfafc0e6debfab10f867c06d.tar.gz arching-kaos-tools-2bca2705e9c83010bfafc0e6debfab10f867c06d.tar.bz2 arching-kaos-tools-2bca2705e9c83010bfafc0e6debfab10f867c06d.zip |
Provide custom installer for NodeJS
Diffstat (limited to 'install.sh')
-rwxr-xr-x | install.sh | 36 |
1 files changed, 31 insertions, 5 deletions
@@ -79,13 +79,39 @@ do if [ "$packageManager" != "" ] then printf "\t Attempting installation..." - $sudoBin $packageManager $installCommand $dontAskFlag $dep > /dev/null 2>&1 - if [ $? -ne 0 ] + if [ "$dep" == "npm" ] then - printf "\t Failed to install!\n" - exit 1 + curl -o nvm_installer.sh https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh + if [ $? -ne 0 ] + then + print "\t Failed to download!\n" + exit 1 + fi + printf "\t Downloaded!" + bash nvm_installer.sh + if [ $? -ne 0 ] + then + print "\t Failed to install nvm!\n" + exit 1 + fi + printf "\t nvm installed!" + printf "\t Installing latest nodejs..." + nvm install $(nvm ls-remote|tail -n 1) + if [ $? -ne 0 ] + then + print "\t Failed to install nodejs!\n" + exit 1 + fi + printf "\t nodejs installed!\n" + else + $sudoBin $packageManager $installCommand $dontAskFlag $dep > /dev/null 2>&1 + if [ $? -ne 0 ] + then + printf "\t Failed to install!\n" + exit 1 + fi + printf "\t installed!\n" fi - printf "\t installed!\n" else printf "\t Don't know how to install!\n\nInstall $dep manually!\n" exit 1 |