title: How to make a script that installs nodejs on any OS
body: <p>I have been trying to make a script in bash on how to install node.js on any Operating system. I have tried using docker, but it seems to not work. Is there a better method. I would appreciate it if you could. I would like it so that the script installs it for all users, meaning superuser permissions/superuser shell is not required. Here is small script that I borrowed that checks if you have nodejs installed</p>
  <pre><code>#!/bin/bash
  
  rm -f tt
  echo `which node` &gt; tt
  value=`ls -lrt tt | awk '{print $5}'`
  if [ $value == 1 ]
  then
    rm tt
    echo &quot;nodejs is not installed. Now installing.&quot;
    #installing code
  else
    rm tt
    echo &quot;installed&quot;
  fi
  
  </code></pre>
  <p>Can someone please help me, I hope I have provided enough details, and please comment if you need more. Have a great day.</p>