File tree Expand file tree Collapse file tree 3 files changed +30
-10
lines changed
Expand file tree Collapse file tree 3 files changed +30
-10
lines changed Original file line number Diff line number Diff line change 11DOTFILES_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST ) ) ) )
2- OS := $(shell bin/is-supported bin/is-macos macos linux)
3- HOMEBREW_PREFIX := $(shell bin/is-supported bin/is-macos $( shell bin/is-supported bin/is- arm64 /opt/homebrew /usr/local) /home/linuxbrew/.linuxbrew )
2+ OS := $(shell bin/is-supported bin/is-macos macos bin/is-ubuntu ubuntu bin/is-arch arch linux)
3+ HOMEBREW_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 )
66SHELL := env PATH=$(PATH ) /bin/bash
@@ -16,21 +16,32 @@ all: $(OS)
1616
1717macos : sudo core-macos packages link duti bun
1818
19- linux : core-linux link bun
19+ linux : ubuntu
20+
21+ ubuntu : core-ubuntu link bun
22+
23+ arch : core-arch link bun
2024
2125core-macos : brew bash git npm
2226
23- core-linux :
24- apt-get update
25- apt-get upgrade -y
26- apt-get dist-upgrade -f
27+ core-ubuntu :
28+ sudo apt-get update
29+ sudo apt-get upgrade -y
30+ sudo apt-get dist-upgrade -f
31+
32+ stow-ubuntu : core-ubuntu
33+ is-executable stow || sudo apt-get -y install stow
34+
35+ core-arch :
36+ sudo pacman -Syu --noconfirm
37+ sudo pacman -S --noconfirm git base-devel
38+
39+ stow-arch : core-arch
40+ is-executable stow || pacman -S --noconfirm stow
2741
2842stow-macos : brew
2943 is-executable stow || brew install stow
3044
31- stow-linux : core-linux
32- is-executable stow || apt-get -y install stow
33-
3445sudo :
3546ifndef GITHUB_ACTION
3647 sudo -v
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ [ -f /etc/arch-release ]
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ if [ -f /etc/os-release ]; then
3+ . /etc/os-release
4+ [ " $ID " = " ubuntu" ]
5+ else
6+ exit 1
7+ fi
You can’t perform that action at this time.
0 commit comments