Skip to content

Commit

Permalink
Housekeep the Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Oct 5, 2023
1 parent 721a579 commit 1b13e65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
16 changes: 6 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ SHELL = /bin/bash
DOTFILES_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
OS := $(shell bin/is-supported bin/is-macos macos linux)
HOMEBREW_PREFIX := $(shell bin/is-supported bin/is-macos $(shell bin/is-supported bin/is-arm64 /opt/homebrew /usr/local) /home/linuxbrew/.linuxbrew)
PATH := $(HOMEBREW_PREFIX)/bin:$(DOTFILES_DIR)/bin:$(PATH)
export N_PREFIX = $(HOME)/.n
PATH := $(HOMEBREW_PREFIX)/bin:$(DOTFILES_DIR)/bin:$(N_PREFIX)/bin:$(PATH)
SHELLS := /private/etc/shells
BIN := $(HOMEBREW_PREFIX)/bin
export XDG_CONFIG_HOME = $(HOME)/.config
export N_PREFIX = $(HOME)/.n
export STOW_DIR = $(DOTFILES_DIR)
export ACCEPT_EULA=Y

Expand All @@ -18,7 +18,7 @@ macos: sudo core-macos packages link duti

linux: core-linux link

core-macos: brew bash git npm ruby rust
core-macos: brew bash git npm

core-linux:
apt-get update
Expand Down Expand Up @@ -76,24 +76,20 @@ git: brew
npm: brew-packages
n install lts

ruby: brew
brew install ruby

rust: brew
brew install rust

brew-packages: brew
brew bundle --file=$(DOTFILES_DIR)/install/Brewfile || true

cask-apps: brew
brew bundle --file=$(DOTFILES_DIR)/install/Caskfile || true
defaults write org.hammerspoon.Hammerspoon MJConfigFile "~/.config/hammerspoon/init.lua"

vscode-extensions: cask-apps
for EXT in $$(cat install/Codefile); do code --install-extension $$EXT; done

node-packages: npm
$(N_PREFIX)/bin/npm install -g $(shell cat install/npmfile)

rust-packages: rust
rust-packages: brew-packages
cargo install $(shell cat install/Rustfile)

duti:
Expand Down
1 change: 1 addition & 0 deletions install/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ brew "the_silver_searcher"
brew "gh"
brew "n"
brew "python"
brew "ruby"
brew "rust"
brew "shellcheck"

Expand Down

0 comments on commit 1b13e65

Please sign in to comment.