Skip to content

Commit

Permalink
Merge pull request #690 from rohancl/develop
Browse files Browse the repository at this point in the history
Made the script Docker-compatible + Prevented version failures
  • Loading branch information
agentmilindu authored Jan 7, 2019
2 parents bb39fa9 + aa4e8af commit 72f8c55
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 49 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

# Created by https://www.gitignore.io/api/vim,node,python,sublimetext,visualstudiocode

### Mac Junk ###
.DS_Store

### Node ###
# Logs
logs
Expand Down
93 changes: 44 additions & 49 deletions setup.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,49 +1,44 @@
#!/bin/bash

echo "Installing pip"
sudo apt-get install -y python3-pip
echo "pip installed"

echo "Installing setuptools"
sudo apt-get install -y python3-setuptools
echo "pip installed"

echo "Installing Aria2"
sudo apt-get install -y aria2
echo "Aria2 installed"

echo "Installing mysql-server"
sudo apt-get install -y mysql-server
echo "mysql-server installed"

echo "Installing libmysqlclient"
sudo apt-get install libmysqlclient-dev
echo "libmysqlclient installed"

echo "Installing node"
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
echo "NodeJS installed"

echo "Installing bower globally"
sudo npm install -g bower
echo "bower installed"

echo "Installing gulp globally"
sudo npm install -g gulp
echo "gulp installed"

# save the directory for further uses
pwd > main_directory.txt

echo "Adding path to bashrc file"
main_file="main_directory.txt"
main_directory=""
while IFS= read line
do
echo "$line"
main_directory=$line
done <"$main_file"
rm -rf main_directory.txt
echo "export PATH=\"$main_directory:$""PATH\"" | sudo tee -a ~/.bashrc > /dev/null
source ~/.bashrc
#!/bin/sh
if ! [ $(id -u) = 0 ]; then
printf "Please run as root to proceed with installations... \n1. Type in: su\n2. Enter your password\n3. Execute: sh setup.sh\n"

else
echo "Starting Installation..."

echo "Udating package list and Pre-installed package versions"
apt-get update && apt-get upgrade
echo "All packages now updated and ready to be used"

echo "Installing pip"
apt-get install -y python3-pip
echo "pip installed"

echo "Installing setuptools"
apt-get install -y python3-setuptools
echo "pip installed"

echo "Installing Aria2"
apt-get install -y aria2
echo "Aria2 installed"

echo "Installing mysql-server"
apt-get install -y mysql-server
echo "mysql-server installed"

echo "Installing libmysqlclient"
apt-get install libmysqlclient-dev
echo "libmysqlclient installed"

echo "Installing node"
curl -sL https://deb.nodesource.com/setup_6.x
apt-get install -y nodejs
echo "NodeJS installed"

echo "Installing bower globally"
npm install -g bower
echo "bower installed"

echo "Installing gulp globally"
npm install -g gulp
echo "gulp installed"
fi

0 comments on commit 72f8c55

Please sign in to comment.