-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall
More file actions
executable file
·57 lines (50 loc) · 1.21 KB
/
install
File metadata and controls
executable file
·57 lines (50 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#! /bin/bash
#create required directories if they doen't exist
curdir=$(pwd)
mkdir -p ~/.marks
which brew
if [ $? -eq 0 ]; then
#this machine has brew running
echo "We are going to brew install some things"
brew update
for pkg in `cat requirements/brew.txt | tr '\n' ' '`; do
if brew list -1 | grep -q "^${pkg}\$"; then
:
else
brew install $pkg
fi
done
for pkg in `cat requirements/brew-cask.txt | tr '\n' ' '`; do
if brew cask list -1 | grep -q "^${pkg}\$"; then
:
else
brew cask install $pkg
fi
done
fi
which apt-get
if [ $? -eq 0 ]; then
#this machine has apt-get
echo "We are going to sudo apt-get install some things"
sudo apt-get update
sudo apt-get -y install `cat requirements/apt-get.txt | tr '\n' ' '`
fi
which pip
if [ $? -eq 0 ]; then
#this machine has pip
echo "we are going to pip install some things"
pip install -r requirements/pip.txt
fi
#run the rest of the install script
python install.py
if [ $? -eq 0 ]; then
#Run all scripts in install_scripts
cd install_scripts
for file in *.sh; do
./$file
cd $curdir/install_scripts
done
else
echo "Main Install Script failed"
exit
fi