11DOTFILES_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST ) ) ) )
2- OS := $(shell bin/is-supported bin/is-macos macos bin/is-ubuntu ubuntu bin/is-arch arch linux)
2+ OS := $(shell bin/is-supported bin/is-macos macos $( shell bin/is-supported bin/is- ubuntu ubuntu $( shell bin/is-supported bin/is- arch arch linux) ) )
33HOMEBREW_PREFIX := $(shell bin/is-supported bin/is-arm64 /opt/homebrew /usr/local)
44export N_PREFIX = $(HOME ) /.n
55PATH := $(HOMEBREW_PREFIX ) /bin:$(DOTFILES_DIR ) /bin:$(N_PREFIX ) /bin:$(PATH )
@@ -14,27 +14,24 @@ export ACCEPT_EULA=Y
1414
1515all : $(OS )
1616
17- macos : sudo core-macos packages link duti bun
17+ macos : sudo core-macos packages-macos link duti bun
1818
19- linux : ubuntu
19+ ubuntu : core- ubuntu link
2020
21- ubuntu : core-ubuntu link bun
22-
23- arch : core-arch link bun
21+ arch : core-arch packages-arch link
2422
2523core-macos : brew bash git npm
2624
2725core-ubuntu :
28- sudo apt-get update
29- sudo apt-get upgrade -y
30- sudo apt-get dist-upgrade -f
26+ apt-get update
27+ apt-get upgrade -y
28+ apt-get dist-upgrade -f
3129
3230stow-ubuntu : core-ubuntu
33- is-executable stow || sudo apt-get -y install stow
31+ is-executable stow || apt-get -y install stow
3432
3533core-arch :
36- sudo pacman -Syu --noconfirm
37- sudo pacman -S --noconfirm git base-devel
34+ pacman -Syu --noconfirm
3835
3936stow-arch : core-arch
4037 is-executable stow || pacman -S --noconfirm stow
@@ -48,8 +45,6 @@ ifndef GITHUB_ACTION
4845 while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
4946endif
5047
51- packages : brew-packages cask-apps node-packages rust-packages
52-
5348link : stow-$(OS )
5449 for FILE in $$ (\l s -A runcom); do if [ -f $( HOME) /$$ FILE -a ! -h $( HOME) /$$ FILE ]; then \
5550 mv -v $(HOME ) /$$ FILE{,.bak}; fi ; done
@@ -66,7 +61,7 @@ unlink: stow-$(OS)
6661 mv -v $(HOME ) /$$ FILE.bak $(HOME ) /$$ {FILE%%.bak}; fi ; done
6762
6863brew :
69- is-executable brew || curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master /install.sh | bash
64+ is-executable brew || curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD /install.sh | bash
7065
7166bash : brew
7267ifdef GITHUB_ACTION
@@ -89,6 +84,13 @@ git: brew
8984npm : brew-packages
9085 n install lts
9186
87+ packages-macos : brew-packages cask-apps node-packages rust-packages
88+
89+ packages-arch : pacman-packages
90+
91+ pacman-packages :
92+ pacman -S --noconfirm - < $(DOTFILES_DIR ) /install/pacmanfile
93+
9294brew-packages : brew
9395 brew bundle --file=$(DOTFILES_DIR ) /install/Brewfile || true
9496
0 commit comments