-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev_install.zsh
executable file
·74 lines (65 loc) · 1.61 KB
/
dev_install.zsh
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/zsh
# Developer install script
os=$(uname)
if [[ "$os" == "Darwin" ]]; then
package_manager="brew"
elif [[ "$os" == "FreeBSD" ]]; then
package_manager="pkg"
elif [[ "$os" == "Linux" ]]; then
package_manager="apt-get"
else
echo "operating system not recognized."
return
fi
is_installed () {
name=$1
bool=1
out=$(which "$name")
if [[ "$out" == "$name not found" ]]
then
bool=0
fi
echo -n "$bool"
}
# compass
"$package_manager" install ruby
gem -v
gem update --system
gem install sass
sass -v
gem install compass
gem list | grep compass
# gulp + babel
# see https://stackoverflow.com/questions/41005744/babel-error-couldnt-find-preset-latest-relative-to-directory-when-preset-w#41005814
"$package_manager" install node
npm -v
npm install gulp-cli -g
npm install gulp -D
gulp_deps=(gulp-babel babel-cli babel-preset-es2015 gulp-for-compass gulp-autoprefixer child_process moment properties-reader)
for gulp_dep in $gulp_deps
do
npm install "$gulp_dep"
done
# python 3 + libraries
"$package_manager" install python3
"$package_manager" install wget
wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py
py_deps=(tornado networkx pytest requests_oauthlib colorlog pymongo Sphinx git-lint)
for py_dep in $py_deps
do
pip3 install "$py_dep"
done
# auth secrets
echo 'ask Matt for the file'
# report success (gulp_deps and py_deps not verified here, nor auth_secrets.txt)
dep_names=(ruby gem sass compass node npm gulp babel python3 wget pip3)
for dep_name in $dep_names
do
dep_installed=$(is_installed "$dep_name")
if [[ "$dep_installed" == "0" ]]
then
echo "$dep_name is not installed."
fi
done
# please delete me