Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
389COM_Public/setup.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
43 lines (40 sloc)
1.19 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# SETUP SCRIPT | |
# run this script to install all the required tools and packages. | |
red=$(tput setaf 1) | |
green=$(tput setaf 2) | |
reset=$(tput sgr0) | |
echo | |
echo "============= INSTALLING ${green}DEBIAN${reset} TOOLS ==============" | |
sudo add-apt-repository -y ppa:git-core/ppa | |
sudo apt update -y | |
sudo apt upgrade -y | |
sudo apt install -y psmisc lsof tree build-essential gcc g++ make jq curl git sqlite3 sqlite3-doc | |
sudo apt autoremove -y | |
echo | |
echo "========= INSTALLING NODE USING ${green}NODESOURCE${reset} =========" | |
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - | |
sudo apt install -y nodejs | |
echo | |
echo "=========== INSTALLING THE ${green}NODE PACKAGES${reset} ===========" | |
rm -rf node_modules | |
rm -rf package-lock.json | |
rm -rf uploads/* | |
npm install | |
npm install --save-dev ava eslint # we WILL install these! | |
npm audit fix | |
echo | |
echo "========= CUSTOMISING SHELL PROMPT ==========" | |
if grep PS1 ~/.profile | |
then | |
echo "correct prompt found" | |
else | |
echo "prompt needs updating" | |
echo "PS1='$ '" >> ~/.profile | |
fi | |
echo | |
echo "===== CHECKING THE VERSION OF ${green}NODEJS${reset} INSTALLED =====" | |
node -v | |
echo | |
echo "================= ${green}SETUP COMPLETED ${reset} =================" | |
source ~/.profile |