Repository navigation
Expand file tree
/
Copy pathbase-mac-install
More file actions
executable file
·189 lines (152 loc) · 4.22 KB
/
Copy pathbase-mac-install
File metadata and controls
executable file
·189 lines (152 loc) · 4.22 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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
#!/bin/bash
#
# Install components commonly used on MacOS via Brew
#
OS="$(uname -s)"
if [ "$(whoami)" == "root" ]
then
echo "Do not run brew as root."
exit 1
fi
if [ "$OS" != "Darwin" ] ; then
echo "This script is only for Macintosh systems."
exit 1
fi
if [ -z "$(which brew)" ]
then
echo "You must install brew before running this script. Visit http://brew.sh/ and see http://blog.strug.de/2012/06/my-homebrew-multi-user-setup/"
exit 1
fi
###
### Brew components
###
#
# Get brew set up.
#
brew update
brew doctor
brew upgrade
#
# Tap some things
#
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew tap homebrew/completions
brew tap homebrew/cask
#
# Useful CLI tools / shells
#
brew install tree
brew install hub
brew install wget
brew install jq
brew install mkdocs
brew install bash-completion
brew install bat
brew install composer
brew install iterm2
brew install age
#
# Python, Go and PHP
#
brew install pipx, python@3.13
brew install go
brew tap shivammathur/php
brew install shivammathur/php/php@8.5
brew tap shivammathur/extensions
brew install shivammathur/extensions/pcov@8.5
brew link --force --overwrite shivammathur/php/php@8.5
#
# Containerization
#
brew install docker docker-compose docker-buildx colima
# Ensure Docker config exists and set cliPluginsExtraDirs
DOCKER_CONFIG="$HOME/.docker/config.json"
if [ ! -f "$DOCKER_CONFIG" ]; then
mkdir -p "$(dirname "$DOCKER_CONFIG")"
echo '{}' > "$DOCKER_CONFIG"
fi
# Add cliPluginsExtraDirs entry
jq '. + {"cliPluginsExtraDirs": ["/opt/homebrew/lib/docker/cli-plugins"]}' "$DOCKER_CONFIG" > "$DOCKER_CONFIG.tmp" && mv "$DOCKER_CONFIG.tmp" "$DOCKER_CONFIG"
#
# AI support
#
brew install tailscale
brew install ollama
brew install claude-code
#
# Pantheon security
#
brew install yubico-piv-tool ykpers opensc
#
# Some front-end tools
#
brew install node nodejs yarn
# This complains that I don't have the gem bin directory
# in my PATH, and the latest version of bundler requires
# gem 3 and I have gem 2. Procrastinating on fixing this
# until I actually need these tools.
#gem install bundler foreman --user-install
# brew install chruby ruby-install
# ruby-install ruby 2.0
# Must install chefdk 0.9.0
#brew install Caskroom/cask/chefdk
# Some chef gems
# chef gem install rest-client -v 1.7.2
# chef gem install kitchen-docker -v 2.1.0
#
# Some applicatios
#
#brew install Caskroom/cask/cyberduck
brew cask install gimp
brew install --cask sublime-text
brew install mpg123
brew install --cask openscad@snapshot
# Danger -- don't leave this running too long, it will run away
# with your cpu and all of your memory. I can't stand the other
# clients, though, so oh well.
# brew install Caskroom/cask/colloquy
#
# Postgres
#
# See: https://gist.github.com/kevinelliott/e12aa642a8388baf2499
# Also: http://exponential.io/blog/2015/02/21/install-postgresql-on-mac-os-x-via-brew/
#
# brew install postgres --no-ossp-uuid
# brew pin postgres
# Get postgres version
# postgres_version=$(postgres --version | sed -e 's#[^0-9]*##')
# Re-initialize db if none exists already (this is provided at install)
# initdb /usr/local/var/postgres
# n.b.: extra instructions below could probably be replaced with:
# brew services start postgres
# Create launchctl script. Use 'sed' to set
# 'KeepAlive' and 'RunAtLoad' to 'false'.
# mkdir -p ~/Library/LaunchAgents
# sed -e '/KeepAlive/{n;s#.*# <false/>#;}' -e '/RunAtLoad/{n;s#.*# <false/>#;}' /usr/local/Cellar/postgresql/$postgres_version/homebrew.mxcl.postgresql.plist > ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
# Inject launchctl script
# launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
# Start PostgreSQL
# postgres -D /usr/local/var/postgres
#
# Mysql
#
# See: https://coderwall.com/p/os6woq/uninstall-all-those-broken-versions-of-mysql-and-re-install-it-with-brew-on-mac-mavericks
#
# Although the extra instructions in that article do not seem to be necessary
#
brew install mysql
# Start mysql, and have it run on restart as well:
# brew services start mysql
# Start mysql, but do not run it on restart:
# mysql.server start
###
### Install command line tools
###
if ! command -v xcode-select &> /dev/null
then
xcode-select --install
else
echo "xcode is already installed"
fi