Skip to content
/ dots Public template

Commit

Permalink
Improve script safety and add some more brew formulae
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmichel committed Oct 24, 2022
1 parent e3ea149 commit e96c45d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .bash_profile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env bash

# https://betterdev.blog/minimal-safe-bash-script-template/
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT

# Load the shell dotfiles, and then some:
# * ~/.extra can be used for other settings you don’t want to commit.
for file in ~/.{path,exports,aliases,functions,bash_prompt,extra}; do
Expand Down
21 changes: 20 additions & 1 deletion brew.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env bash

# https://betterdev.blog/minimal-safe-bash-script-template/
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT

# Make sure we’re using the latest Homebrew
brew update

Expand All @@ -24,7 +28,7 @@ brew install gnu-which
# Install a modern version of Bash
brew install bash
# This needs to be added to your bash profile after installing
brew install bash-completion2
brew install bash-completion@2

# Switch to using brew-installed bash as default shell
if ! fgrep -q '/usr/local/bin/bash' /etc/shells; then
Expand Down Expand Up @@ -81,6 +85,7 @@ brew install apm-bash-completion
brew install asciinema
brew install autojump
brew install bandcamp-dl
brew install bandwhich
brew install bat
brew install brightness
brew install curl
Expand Down Expand Up @@ -132,6 +137,8 @@ brew install rhino
brew install rlwrap
brew install s3cmd
brew install shellcheck
brew install slurm
brew install smartmontools
brew install speedtest_cli
brew install ssh-copy-id
brew install sshfs
Expand All @@ -149,5 +156,17 @@ brew install wtf
brew install youtube-dl
brew install zopfli

# QuickLook Plugins
brew install --cask qlmarkdown
brew install --cask qlstephen

# QuickLook Cleanup
# https://github.com/whomwah/qlstephen/tree/3a33aba2b8e9e4c58fdfa03351126f4eaf3a1790#permissions-quarantine
xattr -cr /Applications/QLMarkdown.app
xattr -cr ~/Library/QuickLook/QLStephen.qlgenerator
qlmanage -r
qlmanage -r cache
killall Finder

# Remove outdated versions from the cellar
brew cleanup

0 comments on commit e96c45d

Please sign in to comment.