From 2820f10e6a566214d02146d3450f7cebd74ff7a8 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Sat, 11 Nov 2023 11:55:25 -0500 Subject: [PATCH] Split personal and work brew casks --- install.sh | 14 +++++++++++++- packages-darwin-brew-cask-personal.txt | 4 ++++ packages-darwin-brew-cask-work.txt | 1 + packages-darwin-brew-cask.txt | 3 --- 4 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 packages-darwin-brew-cask-personal.txt create mode 100644 packages-darwin-brew-cask-work.txt diff --git a/install.sh b/install.sh index 77c2618..82be83f 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,9 @@ #!/usr/bin/env bash +readonly PROGNAME=$(basename $0) +readonly PROGDIR=$(readlink -m $(dirname $0)) +readonly ARGS="$@" + install_homebrew() { echo -n Checking homebrew... if command -v brew > /dev/null; then @@ -164,8 +168,16 @@ install_darwin_brew_packages() { install_darwin_brew_cask_packages() { echo -n Checking Darwin brew cask packages... + package_files="packages-darwin-brew-cask.txt" + if [[ $ARGS == "personal" ]]; then + package_files+=" packages-darwin-brew-cask-personal.txt" + fi + if [[ $ARGS == "work" ]]; then + package_files+=" packages-darwin-brew-cask-work.txt" + fi + missing_packages=$( - comm -23 <(cat packages-darwin-brew-cask.txt) <(brew list | sort) \ + comm -23 <(cat $package_files | sort) <(brew list | sort) \ | tr "\n" " " ) diff --git a/packages-darwin-brew-cask-personal.txt b/packages-darwin-brew-cask-personal.txt new file mode 100644 index 0000000..d07c994 --- /dev/null +++ b/packages-darwin-brew-cask-personal.txt @@ -0,0 +1,4 @@ +arduino-ide +battle-net +prusaslicer +zwift diff --git a/packages-darwin-brew-cask-work.txt b/packages-darwin-brew-cask-work.txt new file mode 100644 index 0000000..3c2e18a --- /dev/null +++ b/packages-darwin-brew-cask-work.txt @@ -0,0 +1 @@ +notion diff --git a/packages-darwin-brew-cask.txt b/packages-darwin-brew-cask.txt index 8652e24..5fac838 100644 --- a/packages-darwin-brew-cask.txt +++ b/packages-darwin-brew-cask.txt @@ -1,11 +1,8 @@ alacritty brave-browser discord -element firefox google-chrome -notion rectangle slack -telegram zoom