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