<commit_before>OS=`uname`
DISTRO=""
VERSION=$1

detect_version ()
{
  if [ $# -ne "1" ]
  then
    #echo "Usage: `basename $0` <version>"
    #exit 1
    $VERSION="6.0.0"
  fi
}


detect_os ()
{
  if [[ "$OS" =~ "Darwin" ]]; then
    DISTRO=node-v${VERSION}-darwin-x64
  else
    DISTRO=node-v${VERSION}-linux-x64
  fi
}

main ()
{
  detect_os
  detect_version

  rm -rf /usr/local/bin/node /usr/bin/node /usr/local/bin/npm /usr/bin/npm /tmp/node-*

  FILE=${DISTRO}.tar.gz

  cd /tmp

  curl -O http://nodejs.org/dist/v${VERSION}/$FILE
  tar -zxfv $FILE
  mkdir -p /usr/local/bin/

  ln -s /tmp/$DISTRO/bin/node /usr/local/bin/node
  ln -s /tmp/$DISTRO/bin/npm /usr/local/bin/npm<commit_msg>Update install.sh<commit_after>OS=`uname`
DISTRO=""
VERSION=$1

detect_version ()
{
  if [ $# -ne "1" ]
  then
    echo "Usage: `basename $0` <version>"
    exit 1
  fi
}


detect_os ()
{
  if [[ "$OS" =~ "Darwin" ]]; then
    DISTRO=node-v${VERSION}-darwin-x64
  else
    DISTRO=node-v${VERSION}-linux-x64
  fi
}

main ()
{
  detect_os
  detect_version

  rm -rf /usr/local/bin/node /usr/bin/node /usr/local/bin/npm /usr/bin/npm /tmp/node-*

  FILE=${DISTRO}.tar.gz

  cd /tmp

  curl -O http://nodejs.org/dist/v${VERSION}/$FILE
  tar -zxfv $FILE
  mkdir -p /usr/local/bin/

  ln -s /tmp/$DISTRO/bin/node /usr/local/bin/node
  ln -s /tmp/$DISTRO/bin/npm /usr/local/bin/npm
{'fraction_non_alphanumeric': 0.19413919413919414, 'fraction_numerical': 0.01391941391941392, 'mean_word_length': 2.613756613756614, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3658861', 'n_tokens_mistral': 637, 'n_tokens_neox': 586, 'n_words': 111}