commit 5d04a2e1a35700056161a6d39b7bcdd979fc91fc parent 0933a12efb7db34815ab5ad521b855d0d2ee7c56 Author: Mark Feller <mark@mfeller.io> Date: Wed, 28 Apr 2021 11:22:27 -0600 add installer for packages as well as dot files Diffstat:
M | install | | | 25 | ++++++++++++++++++------- |
A | pkgs/macos | | | 21 | +++++++++++++++++++++ |
2 files changed, 39 insertions(+), 7 deletions(-)
diff --git a/install b/install @@ -44,6 +44,19 @@ macos() copy dots/.zshenv $HOME } +bootstrap_linux() +{ + return +} + +bootstrap_macos() +{ + # Install macOS packages + command -v brew >/dev/null || bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + brew install $(awk '$1 == "B" { print $2 }' pkgs/macos) || true + brew upgrade $(awk '$1 == "B" { print $2 }' pkgs/macos) || true +} + if [ -d "$rice_dir" ]; then cd "$rice_dir" git pull --ff-only @@ -57,10 +70,8 @@ if [ ! -d ~/.ssh ]; then fi cd "$rice_dir" -if [[ "$OSTYPE" == "linux-gnu"* ]]; then - shared; linux -elif [[ "$OSTYPE" == "darwin"* ]]; then - shared; macos -else - echo "Usage: $0"; exit 2 -fi +case "$(uname -s)" in + Linux*) shared; linux; [ "$1" = "-d" ] || bootstrap_linux ;; + Darwin*) shared; macos; [ "$1" = "-d" ] || bootstrap_macos ;; + *) echo "Usage: $0 [-d]"; exit 1 ;; +esac diff --git a/pkgs/macos b/pkgs/macos @@ -0,0 +1,20 @@ +B alacritty +B aspell +B emacs +B font-fira-code +B font-fira-mono +B jq +B ledger +B lf +B mpd +B mpv +B ncmpcpp +B notmuch +B offlineimap +B pinentry-mac +B ripgrep +B tree +B watch +B wget +B youtube-dl +B zsh+ \ No newline at end of file