Added --quiet flag to Homebrew installs
This commit is contained in:
parent
0bad4bde80
commit
2fb9995efa
18 changed files with 38 additions and 35 deletions
|
@ -9,6 +9,8 @@ adobe-creative-cloud curl: (18) HTTP/2 stream 1 was reset
|
|||
|
||||
* NGINX /opt/homebrew/etc/nginx/nginx.conf, on port 8080 so no sudo required, nginx will load all files in /opt/homebrew/etc/nginx/servers/, brew services might require sudo if port 443 is used, Docroot /opt/homebrew/var/www
|
||||
* Full disk access to Terminal required for Parallels
|
||||
* export PATH="$HOME/.jenv/bin:$PATH"
|
||||
* eval "$(jenv init -)"
|
||||
|
||||
# TODOs
|
||||
|
||||
|
@ -245,3 +247,4 @@ The following items have been reviewed but need to be revisited due to complexit
|
|||
* open "x-apple.systempreferences:com.apple.preference.security?Privacy_AllFiles" --- opens to grant full disk access
|
||||
* "Terminal.app" would like to administer your computer. Administration can include modifying passwords, networking, and system settings.
|
||||
* Press ENTER vim +PlugInstall
|
||||
* Sheldon completions
|
|
@ -47,7 +47,7 @@ decryptionFailure() {
|
|||
installAge() {
|
||||
if ! command -v age > /dev/null; then
|
||||
logg info 'Running brew install age'
|
||||
brew install age
|
||||
brew install --quiet age
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ installAge() {
|
|||
installExpect() {
|
||||
if ! command -v expect > /dev/null; then
|
||||
logg info 'Running brew install expect'
|
||||
brew install expect
|
||||
brew install --quiet expect
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ if [ -f "${XDG_DATA_HOME:-$HOME/.local/share}/gas-station/requirements.yml" ]; t
|
|||
if ! command -v ansible-galaxy > /dev/null; then
|
||||
if ! command -v pipx > /dev/null; then
|
||||
logg info 'Installing pipx via Homebrew'
|
||||
brew install pipx
|
||||
brew install --quiet pipx
|
||||
logg info 'Running pipx ensurepath'
|
||||
pipx ensurepath
|
||||
fi
|
||||
|
|
|
@ -45,7 +45,7 @@ if command -v install-program > /dev/null; then
|
|||
env | grep ASDF
|
||||
if ! command -v unbuffer > /dev/null; then
|
||||
if command -v brew > /dev/null; then
|
||||
logg info 'Ensuring expect is installed for the unbuffer command' && brew install expect
|
||||
logg info 'Ensuring expect is installed for the unbuffer command' && brew install --quiet expect
|
||||
fi
|
||||
fi
|
||||
if command -v unbuffer > /dev/null; then
|
||||
|
|
|
@ -122,7 +122,7 @@ function firefoxSetup() {
|
|||
### Download Firefox Profile Switcher
|
||||
if [ ! -d /usr/local/Cellar/firefox-profile-switcher-connector ]; then
|
||||
logg info 'Ensuring Firefox Profile Switcher is installed'
|
||||
brew install null-dev/firefox-profile-switcher/firefox-profile-switcher-connector
|
||||
brew install --quiet null-dev/firefox-profile-switcher/firefox-profile-switcher-connector
|
||||
fi
|
||||
|
||||
### Ensure Firefox Profile Switcher configuration is symlinked
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
if [ -d /Applications ] && [ -d /System ]; then
|
||||
if ! command -v defaultbrowser > /dev/null; then
|
||||
logg info 'Installing defaultbrowser via Homebrew which is the preferred way of configuring the default browser'
|
||||
brew install defaultbrowser
|
||||
brew install --quiet defaultbrowser
|
||||
fi
|
||||
logg info "Setting default browser to {{ .user.defaultBrowserDarwin }}"
|
||||
osascript "$HOME/Library/Scripts/default-browser.scpt" "{{ .user.defaultBrowserDarwin }}"
|
||||
|
|
|
@ -18,7 +18,7 @@ if [ -n "$DIGITALOCEAN_ACCESS_TOKEN" ] && [ -n '{{ .user.digitalOceanClusterId }
|
|||
### Ensure DigitalOcean CLI is instaled
|
||||
if ! command -v doctl > /dev/null; then
|
||||
logg info 'doctl is missing - installing via Homebrew'
|
||||
brew install doctl
|
||||
brew install --quiet doctl
|
||||
fi
|
||||
|
||||
### Connect to the k8s cluster with `doctl`
|
||||
|
|
|
@ -59,7 +59,7 @@ if [[ ! "$(test -d /proc && grep Microsoft /proc/version > /dev/null)" ]]; then
|
|||
if [ -d /System ] && [ -d /Applications ]; then
|
||||
### Install on macOS
|
||||
if [ ! -d "/Applications/Cloudflare WARP.app" ]; then
|
||||
brew install --cask --no-quarantine cloudflare-warp
|
||||
brew install --cask --no-quarantine --quiet cloudflare-warp
|
||||
else
|
||||
logg info 'Cloudflare WARP already installed'
|
||||
fi
|
||||
|
@ -179,7 +179,7 @@ if command -v warp-cli > /dev/null; then
|
|||
if ! pip3 list certifi | grep certifi > /dev/null; then
|
||||
if command -v brew > /dev/null; then
|
||||
logg info 'Ensuring Python certifi is installed via Homebrew'
|
||||
brew install python-certifi
|
||||
brew install --quiet python-certifi
|
||||
else
|
||||
logg info 'Ensuring certifi is installed globally for Python 3'
|
||||
pip3 install certifibrew link --overwrite python-certifi
|
||||
|
|
|
@ -22,7 +22,7 @@ export PATH="$VOLTA_HOME/bin:$PATH"
|
|||
if ! command -v node > /dev/null; then
|
||||
if command -v brew; then
|
||||
logg 'Installing node via Homebrew'
|
||||
brew install node || NODE_EXIT_CODE=$?
|
||||
brew install --quiet node || NODE_EXIT_CODE=$?
|
||||
if [ -n "$NODE_EXIT_CODE" ]; then
|
||||
logg warn 'Calling brew link --overwrite node because the Node.js installation seems to be misconfigured'
|
||||
brew link --overwrite node
|
||||
|
@ -38,7 +38,7 @@ fi
|
|||
if ! command -v volta > /dev/null; then
|
||||
if command -v brew > /dev/null; then
|
||||
logg 'Installing volta via brew'
|
||||
brew install volta
|
||||
brew install --quiet volta
|
||||
else
|
||||
logg warn 'brew needs to be available to install Volta'
|
||||
fi
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
if ! command -v go > /dev/null; then
|
||||
if command -v brew; then
|
||||
logg 'Installing go via Homebrew'
|
||||
brew install go || GO_EXIT_CODE=$?
|
||||
brew install --quiet go || GO_EXIT_CODE=$?
|
||||
if [ -n "$GO_EXIT_CODE" ]; then
|
||||
logg error 'go was not successfully installed via Homebrew'
|
||||
fi
|
||||
|
@ -36,7 +36,7 @@ fi
|
|||
if ! command -v gh > /dev/null; then
|
||||
if command -v brew; then
|
||||
logg 'Installing gh via Homebrew'
|
||||
brew install gh || GH_EXIT_CODE=$?
|
||||
brew install --quiet gh || GH_EXIT_CODE=$?
|
||||
if [ -n "$GH_EXIT_CODE" ]; then
|
||||
logg error 'gh was not successfully installed via Homebrew'
|
||||
fi
|
||||
|
@ -51,7 +51,7 @@ fi
|
|||
if ! command -v delta > /dev/null; then
|
||||
if command -v brew; then
|
||||
logg 'Installing delta via Homebrew'
|
||||
brew install git-delta || DELTA_EXIT_CODE=$?
|
||||
brew install --quiet git-delta || DELTA_EXIT_CODE=$?
|
||||
if [ -n "$DELTA_EXIT_CODE" ]; then
|
||||
logg error 'git-delta was not successfully installed via Homebrew'
|
||||
fi
|
||||
|
|
|
@ -20,7 +20,7 @@ if [ -d /Applications ] && [ -d /System ]; then
|
|||
# macOS
|
||||
if [ ! -d /Applications/Docker.app ]; then
|
||||
logg info 'Installing Docker on macOS via Homebrew cask'
|
||||
brew install --cask --no-quarantine docker
|
||||
brew install --cask --quiet --no-quarantine docker
|
||||
else
|
||||
logg info 'Docker appears to be installed already'
|
||||
fi
|
||||
|
|
|
@ -74,7 +74,7 @@ if [ "${container:=}" != 'docker' ]; then
|
|||
elif [ -f "$(dirname "${BASH_SOURCE[0]}")/gum" ]; then
|
||||
GUM_PATH="$(dirname "${BASH_SOURCE[0]}")/gum"
|
||||
elif type brew &> /dev/null; then
|
||||
brew install gum
|
||||
brew install --quiet gum
|
||||
GUM_PATH="$(which gum)"
|
||||
else
|
||||
if ! command -v qubesctl > /dev/null; then
|
||||
|
@ -138,7 +138,7 @@ logg() {
|
|||
elif [ -f "$(dirname "${BASH_SOURCE[0]}")/glow" ]; then
|
||||
GLOW_PATH="$(dirname "${BASH_SOURCE[0]}")/glow"
|
||||
elif type brew &> /dev/null; then
|
||||
brew install glow
|
||||
brew install --quiet glow
|
||||
GLOW_PATH="$(which glow)"
|
||||
else
|
||||
if ! command -v qubesctl > /dev/null; then
|
||||
|
|
|
@ -258,7 +258,7 @@ export HSTR_TIOCSTI=y
|
|||
|
||||
### Homebrew
|
||||
export HOMEBREW_BUNDLE_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/Brewfile"
|
||||
export HOMEBREW_CASK_OPTS="--appdir=/Applications --display-times --no-quarantine"
|
||||
export HOMEBREW_CASK_OPTS="--appdir=/Applications --display-times --no-quarantine --quiet"
|
||||
|
||||
### HTTPie
|
||||
export HTTPIE_CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/httpie"
|
||||
|
|
|
@ -713,7 +713,7 @@ async function ensurePackage(dep) {
|
|||
if (updateDone['brew'] !== true) {
|
||||
await beforeInstall('brew')
|
||||
}
|
||||
await $`brew install ${dep}`
|
||||
await $`brew install --quiet ${dep}`
|
||||
} else if (osType === 'windows') {
|
||||
if (updateDone['choco'] !== true) {
|
||||
await beforeInstall('choco')
|
||||
|
@ -814,7 +814,7 @@ async function beforeInstall(packageManager) {
|
|||
if (osType === 'darwin') {
|
||||
const docker = which.sync('docker', { nothrow: true })
|
||||
if (!docker) {
|
||||
await $`brew install --cask --no-quarantine docker`
|
||||
await $`brew install --cask --no-quarantine --quiet docker`
|
||||
}
|
||||
try {
|
||||
await $`sudo -c 'docker run --rm hello-world' - ${process.env.USER}`
|
||||
|
@ -973,7 +973,7 @@ async function ensurePackageManager(packageManager) {
|
|||
if (osType === 'darwin') {
|
||||
const rustup = which.sync('rustup-init', { nothrow: true })
|
||||
if (!rustup) {
|
||||
await $`brew install rustup`
|
||||
await $`brew install --quiet rustup`
|
||||
}
|
||||
await $`rustup-init -y`
|
||||
} else if (osType === 'windows') {
|
||||
|
@ -1051,12 +1051,12 @@ async function ensurePackageManager(packageManager) {
|
|||
} else if (packageManager === 'gem') {
|
||||
const gem = which.sync('gem', { nothrow: true })
|
||||
if (!gem) {
|
||||
await ensureInstalled('gem', $`brew install ruby`)
|
||||
await ensureInstalled('gem', $`brew install --quiet ruby`)
|
||||
}
|
||||
} else if (packageManager === 'go') {
|
||||
const go = which.sync('go', { nothrow: true })
|
||||
if (!go) {
|
||||
await ensureInstalled('go', $`brew install go`)
|
||||
await ensureInstalled('go', $`brew install --quiet go`)
|
||||
}
|
||||
} else if (packageManager === 'nix') {
|
||||
await ensureInstalled(
|
||||
|
@ -1077,7 +1077,7 @@ async function ensurePackageManager(packageManager) {
|
|||
log('info', logStage, `\`npm\`, \`node\`, and \`volta\` are available`)
|
||||
} else {
|
||||
if (!volta) {
|
||||
await $`brew install volta`
|
||||
await $`brew install --quiet volta`
|
||||
}
|
||||
await $`
|
||||
export VOLTA_HOME="\${XDG_DATA_HOME:-$HOME/.local/share}/volta"
|
||||
|
@ -1093,7 +1093,7 @@ async function ensurePackageManager(packageManager) {
|
|||
} else if (packageManager === 'pipx') {
|
||||
const pipx = which.sync('pipx', { nothrow: true })
|
||||
if (!pipx) {
|
||||
await ensureInstalled('pipx', $`brew install pipx`)
|
||||
await ensureInstalled('pipx', $`brew install --quiet pipx`)
|
||||
await $`pipx ensurepath`
|
||||
}
|
||||
} else if (packageManager === 'pkg') {
|
||||
|
@ -1175,7 +1175,7 @@ async function ensurePackageManager(packageManager) {
|
|||
}
|
||||
} else if (packageManager === 'script') {
|
||||
} else if (packageManager === 'whalebrew') {
|
||||
await ensureInstalled('whalebrew', $`brew install whalebrew`)
|
||||
await ensureInstalled('whalebrew', $`brew install --quiet whalebrew`)
|
||||
} else if (packageManager === 'winget') {
|
||||
await ensureInstalled(
|
||||
'winget',
|
||||
|
@ -1290,7 +1290,7 @@ async function installPackageList(packageManager, packages) {
|
|||
} else if (packageManager === 'brew') {
|
||||
for (let pkg of packages) {
|
||||
try {
|
||||
runCommand(`Installing ${pkg} via ${packageManager}`, `brew install ${pkg}`)
|
||||
runCommand(`Installing ${pkg} via ${packageManager}`, `brew install --quiet ${pkg}`)
|
||||
log('success', 'Install', `${pkg} successfully installed via ${packageManager}`)
|
||||
} catch (e) {
|
||||
log('error', 'Install', `There was an error installing ${pkg} with brew`)
|
||||
|
@ -1300,7 +1300,7 @@ async function installPackageList(packageManager, packages) {
|
|||
} else if (packageManager === 'cask') {
|
||||
for (let pkg of packages) {
|
||||
try {
|
||||
runCommand(`Installing ${pkg} via ${packageManager}`, `brew install --cask --no-quarantine ${pkg}`)
|
||||
runCommand(`Installing ${pkg} via ${packageManager}`, `brew install --cask --no-quarantine --quiet ${pkg}`)
|
||||
log('success', 'Install', `${pkg} successfully installed via ${packageManager}`)
|
||||
} catch (e) {
|
||||
log('error', 'Install', `There was an error installing ${pkg} with Homebrew Cask`)
|
||||
|
|
|
@ -98,7 +98,7 @@ if [ "${container:=}" != 'docker' ]; then
|
|||
elif [ -f "$(dirname "${BASH_SOURCE[0]}")/gum" ]; then
|
||||
GUM_PATH="$(dirname "${BASH_SOURCE[0]}")/gum"
|
||||
elif type brew &> /dev/null; then
|
||||
brew install gum
|
||||
brew install --quiet gum
|
||||
GUM_PATH="$(which gum)"
|
||||
else
|
||||
if ! command -v qubesctl > /dev/null; then
|
||||
|
@ -138,7 +138,7 @@ logger() {
|
|||
elif [ -f "$(dirname "${BASH_SOURCE[0]}")/glow" ]; then
|
||||
GLOW_PATH="$(dirname "${BASH_SOURCE[0]}")/glow"
|
||||
elif type brew &> /dev/null; then
|
||||
brew install glow
|
||||
brew install --quiet glow
|
||||
GLOW_PATH="$(which glow)"
|
||||
else
|
||||
if ! command -v qubesctl > /dev/null; then
|
||||
|
|
|
@ -50,7 +50,7 @@ ensureHomebrew() {
|
|||
### Ensure GCC is installed via Homebrew
|
||||
if command -v brew > /dev/null; then
|
||||
if ! brew list | grep gcc > /dev/null; then
|
||||
logg info "Installing Homebrew gcc" && brew install gcc
|
||||
logg info "Installing Homebrew gcc" && brew install --quiet gcc
|
||||
fi
|
||||
else
|
||||
logg error "Failed to initialize Homebrew" && exit 2
|
||||
|
|
|
@ -51,7 +51,7 @@ ensureHomebrew
|
|||
|
||||
# @description Ensures `cloudflared` is installed via Homebrew
|
||||
if ! command -v cloudflared > /dev/null; then
|
||||
brew install cloudflared
|
||||
brew install --quiet cloudflared
|
||||
fi
|
||||
|
||||
# @description Detect the SSH port being used
|
||||
|
|
|
@ -228,7 +228,7 @@ handleQubesDom0() {
|
|||
installBrewPackage() {
|
||||
if ! command -v "$1" > /dev/null; then
|
||||
logg 'Installing '"$1"''
|
||||
brew install "$1"
|
||||
brew install --quiet "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -254,7 +254,7 @@ ensureHomebrewDeps() {
|
|||
installBrewPackage "expect"
|
||||
installBrewPackage "gsed"
|
||||
if ! command -v gtimeout > /dev/null; then
|
||||
brew install coreutils
|
||||
brew install --quiet coreutils
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue