-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrew.sh
executable file
·152 lines (129 loc) · 6.94 KB
/
brew.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
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
#!/bin/bash
# ------------------------------------------------------------------------------
# Install command-line tools using Homebrew.
# ------------------------------------------------------------------------------
# Ask for the administrator password upfront.
# sudo -v
# Keep-alive: update existing `sudo` time stamp until the script has finished.
# while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# ------------------------------------------------------------------------------
# Check for Homebrew and install if we don't have it.
# This script installs Homebrew to its preferred prefix:
# /usr/local for macOS Intel
# /opt/homebrew for Apple Silicon
# /home/linuxbrew/.linuxbrew for Linux
# so that you don’t need sudo when you brew install.
if ! command -v brew &> /dev/null; then
echo "Installing homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# │││└─ follow location redirects (redo curl request if necessary)
# ││└─ when used with -s it makes curl show an error message if it fails
# │└─ silent or quiet mode
# └─ fail silently on server errors
fi
# (Optionally) Turn off brew's analytics https://docs.brew.sh/Analytics
brew analytics off
# Enable autoupdate every 1 week (604800 seconds)
# To stop, use the command 'brew autoupdate stop'
brew autoupdate start 604800 --cleanup --enable-notification
# Make sure we’re using the latest Homebrew.
brew update
# Upgrade any already-installed formulae.
brew upgrade
# ------------------------------------------------------------------------------
formulas=(
git # Distributed revision control system.
# coreutils # GNU core utilities (those that come with OS X are outdated).
# moreutils # Collection of tools that nobody wrote when UNIX was young.
# findutils # Collection of GNU find, xargs, and locate.
gnu-sed # GNU/Linux implementation of stream editor.
# htop # Improved top (interactive process viewer).
# glances # Alternative to top/htop.
# tree # Display directories as trees.
# peco # Simplistic interactive filtering tool.
# exa # Modern replacement for 'ls'
bat # Clone of cat(1) with syntax highlighting and Git integration
mas # Mac App Store command-line interface.
qpdf # Tools for and transforming and inspecting PDF files.
# pandoc # Swiss-army knife of markup format conversion.
# gnupg # GNU Pretty Good Privacy (PGP) package.
# pyenv # Python version management.
# pipenv # Python dependency management tool.
# ruby # Distributed revision control system.
node # node.js | Platform built on V8 to build network applications.
node-sass # The reference implementation of Sass, written in Dart.
# vite # Next generation frontend tooling. It's fast!
# angular-cli # CLI tool for Angular.
shellcheck # Static analysis and lint tool, for (ba)sh scripts.
cloc # Statistics utility to count lines of code.
# libpq # Postgres C API library
)
# Install packages
for formula in "${formulas[@]}"; do
brew install "$formula" || brew upgrade "$formula"
done
echo "Success! Homebrew formulas are installed."
# ------------------------------------------------------------------------------
casks=(
firefox # Web browser.
google-chrome # Web browser.
# vivaldi # Web browser focusing on customization and control.
# opera # Web browser.
microsoft-edge # [.pkg] Web browser.
alfred # Application launcher and productivity software.
# raycast # Control your tools with a few keystrokes.
path-finder # File manager.
betterzip # Utility to create and modify archives.
default-folder-x # Utility to enhance the Open and Save dialogs in applications.
# hyperdock # Add Window previews to dock apps.
dockdoor # Window peeking utility app.
alt-tab # Enable Windows-like alt-tab.
soundsource # Sound and audio controller.
# moom # Utility to move and zoom windows—on one display.
shottr # Screenshot measurement and annotation tool.
little-snitch # Host-based application firewall.
cloudflare-warp # Free app that makes your Internet safer.
# hazel # Automated organization.
bartender # Menu bar icon organizer.
spotify # Music streaming service.
# julia # Programming language for technical computing.
docker # App to build and share containerized applications and microservices.
visual-studio-code # Open-source code editor, diff, merge.
jetbrains-toolbox # JetBrains tools manager.
# postman # Collaboration platform for API development.
imageoptim # Tool to optimize images to a smaller size.
# handbrake # Open-source video transcoder.
# authy # Two-factor authentication software.
iina # Free and open-source media player.
vlc # Multimedia player.
# downie # Downloads videos from different websites.
# permute # Converts and edits video, audio or image files.
# microsoft-teams # [.pkg] Meet, chat, call, and collaborate in just one place.
# skype # Video chat, voice call and instant messaging application.
# zoom # [.pkg] Video communication and virtual meeting platform.
microsoft-office # [.pkg] Microsoft Office suite.
libreoffice # Office suite.
# soulver # Notepad with a built-in calculator.
# gpg-suite-no-mail # Tools to protect your files.
quicklook-json # QuickLook plugin for JSON files.
qlmarkdown # QuickLook generator for Markdown files.
chatgpt # OpenAI's official ChatGPT desktop app.
whatsapp # Native desktop client for WhatsApp.
)
# Install cask packages
for cask in "${casks[@]}"; do
brew install --cask --appdir="/Applications" "$cask" || brew upgrade --cask "$cask" || echo "'$cask' is already installed via other (non-homebrew)."
done
echo "Success! Homebrew casks are installed."
# ------------------------------------------------------------------------------
fonts_list=(
font-jetbrains-mono-nerd-font
)
for font in "${fonts_list[@]}"
do
brew install --cask "$font"
done
echo "Success! Homebrew cask fonts are installed."
# ------------------------------------------------------------------------------
# Remove outdated versions from the cellar.
brew cleanup