Installing Node.js on CentOS

I wrote the following script to install Node.js on CentOS to handle a Rails missing a JavaScript runtime environment error.

#!/usr/bin/env bash
set -ue
sudo echo "Ensure sudo access."
sudo touch /etc/yum.repos.d/naulinux-extras.repo
sudo sh -c "echo '[naulinux-extras]
name=NauLinux Extras
baseurl=http://downloads.naulinux.ru/pub/NauLinux/6.2/\$basearch/Extras/RPMS/
enabled=0
gpgcheck=1
gpgkey=http://downloads.naulinux.ru/pub/NauLinux/RPM-GPG-KEY-linux-ink
' > /etc/yum.repos.d/naulinux-extras.repo"
sudo yum --enablerepo=naulinux-extras install nodejs