-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (34 loc) · 1.02 KB
/
Makefile
File metadata and controls
41 lines (34 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
SHELL = /bin/bash
DOTFILES_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
OS := $(shell bin/is-supported bin/is-macos macos linux)
PATH := $(DOTFILES_DIR)/bin:$(PATH)
NVM_DIR := $(HOME)/.nvm
export XDG_CONFIG_HOME = $(HOME)/.config
export STOW_DIR = $(DOTFILES_DIR)
export ACCEPT_EULA=Y
all: $(OS)
macos: sudo core-macos packages link
core-macos: brew bash git npm ruby
brew:
is-executable brew || curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh | bash
bash: BASH=/usr/local/bin/bash
bash: SHELLS=/private/etc/shells
bash: brew
ifdef GITHUB_ACTION
if ! grep -q $(BASH) $(SHELLS); then \
brew install bash bash-completion@2 pcre && \
sudo append $(BASH) $(SHELLS) && \
sudo chsh -s $(BASH); \
fi
else
if ! grep -q $(BASH) $(SHELLS); then \
brew install bash bash-completion@2 pcre && \
sudo append $(BASH) $(SHELLS) && \
chsh -s $(BASH); \
fi
endif
sudo:
ifndef GITHUB_ACTION
sudo -v
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
endif