-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_all.sh
executable file
·69 lines (62 loc) · 1.8 KB
/
install_all.sh
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
#!/bin/sh
printf "Installing git, python3, curl, wget...\n"
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
# ...
printf "Linux is not yet fully supported.\n"
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
if [[ `which brew` == "" ]]; then
printf "Installing Homebrew...\n"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
printf "Using Homebrew...\n"
fi
to_inst=""
if [[ `which git` == "" ]]; then
to_inst+=" git"
fi
if [[ `which python3` == "" ]]; then
to_inst+=" python3"
fi
if [[ `which curl` == "" ]]; then
to_inst+=" curl"
fi
if [[ `which wget` == "" ]]; then
to_inst+=" wget"
fi
if [[ "$to_inst" ]]; then
brew install $to_inst
fi
elif [[ "$OSTYPE" == "cygwin" ]]; then
# POSIX compatibility layer and Linux environment emulation for Windows
printf "Cygwin is not yet fully supported.\n"
elif [[ "$OSTYPE" == "msys" ]]; then
# Lightweight shell and GNU utilities compiled for Windows (part of MinGW)
printf "Msys is not yet fully supported.\n"
elif [[ "$OSTYPE" == "win32" ]]; then
# I'm not sure this can happen.
printf "Win32 is not yet fully supported.\n"
elif [[ "$OSTYPE" == "freebsd"* ]]; then
printf "FreeBSD is not yet fully supported.\n"
to_inst=""
if [[ `which git` == "" ]]; then
to_inst+=" git"
fi
if [[ `which python3` == "" ]]; then
to_inst+=" python3"
fi
if [[ `which curl` == "" ]]; then
to_inst+=" curl"
fi
if [[ `which wget` == "" ]]; then
to_inst+=" wget"
fi
if [[ "$to_inst" ]]; then
su root -c "pkg install $to_inst"
fi
else
# Unknown.
printf "This OS ($OSTYPE) is not yet fully supported.\n"
fi
git clone https://github.com/eturnq/unix-dotfiles ~/.config/unix-dotfiles
python3 ~/.config/unix-dotfiles/install_stage2.py