-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall
executable file
·125 lines (93 loc) · 3.2 KB
/
install
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#!/usr/bin/env bash
#
# Run all dotfiles installers.
# shellcheck disable=SC1090,SC1091
[[ ! -d "${DOTFILES:-}" ]] && DOTFILES=$(cd "${BASH_SOURCE%/*}/.." && pwd)
type "find_files" &>/dev/null || . "$DOTFILES/functions/find_files"
# Install all other dot-packages
# find the installers and run them iteratively
for _file in $(find_files "$DOTFILES" 'install.sh' 2); do
. "$_file"
done
# Homebrew installs
if type "brew" &>/dev/null; then
# Sadly, many dependecies cannot be installed by Homebrew Bundle
# because there is "... (no bottle for Apple Silicon)".
# However, in most cases, `brew install [formula]` does work.
# There is no workaround for this except to install manually.
# When there are finally "bottles for Apple Silicon",
# the workaround below can be refactored accordingly.
brew install \
bash \
curl \
gcc \
libzip \
git \
git-lfs \
curl \
pv \
node \
;
# Install deps/apps using Brewfile (Homebrew Bundle)
if [[ -r "$HOME/.Brewfile" ]]; then
(
cd && brew bundle --global --file "$HOME/.Brewfile"
brew bundle check
)
fi
# Remove outdated versions from the cellar.
brew cleanup
fi
# Node.js/npm installs
if type "npm" &>/dev/null; then
npm install -g \
cucumber \
serverless \
yo \
;
npm cache clean -g -f
fi
# Ruby/Bundler installs
if type "bundle" &>/dev/null && [[ -r "$HOME/.Gemfile" ]]; then
(cd && bundle install --gemfile="$HOME/.Gemfile")
fi
#-------------------------------------------------------------------------------
# OS-specific Installs
#-------------------------------------------------------------------------------
if [[ "$OSTYPE" == "freebsd"* ]]; then
: # FreeBSD
elif [[ "$OSTYPE" == "linux-gnu" ]]; then
: # Linux
if type "apt-get" &>/dev/null; then
: # Debian or Ubuntu:
elif type "yum" &>/dev/null; then
: # Fedora, CentOS or Red Hat:
# Install Extra Packages for Enterprise Linux (EPEL)
# There are repository rpm packages for RHEL5, RHEL6 and RHEL7.
# The repository package installs the repo details on your local system for yum or up2date to use.
# Then you can install packages with your usual method, and the EPEL repository is included.
# https://fedoraproject.org/wiki/EPEL/FAQ#How_can_I_install_the_packages_from_the_EPEL_software_repository.3F
su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm'
else
: # Unknown Linux OS
fi
elif [[ "$OSTYPE" == "darwin"* ]]; then
: # macOS (Darwin)
# Set macOS defaults
# This should only be run once Apps/Casks have been installed.
[[ -s "$DOTFILES/macos/set-defaults.sh" ]] && . "$DOTFILES/macos/set-defaults.sh"
# sh_info "installing dependencies"
# if source bin/dot > /tmp/dotfiles-dot 2>&1; then
# sh_success "dependencies installed"
# else
# sh_fail "error installing dependencies"
# fi
elif [[ "$OSTYPE" == "cygwin" ]]; then
: # POSIX compatibility layer and Linux environment emulation for Windows
elif [[ "$OSTYPE" == "msys" ]]; then
: # Lightweight shell and GNU utilities compiled for Windows (part of MinGW)
elif [[ "$OSTYPE" == "win32" ]]; then
: # Windows (32-bit) (...this may not work...)
else
: # Unknown OS
fi