Add update command to Makefile to pull external repos
This commit is contained in:
parent
ef21892fce
commit
0dd2486013
9
Makefile
9
Makefile
|
@ -8,17 +8,18 @@ CONFIG_DIR := $(if $(XDG_CONFIG_HOME), $(XDG_CONFIG_HOME), $(HOME)/.config)
|
||||||
BIN_DIR := $(HOME)/.local/bin
|
BIN_DIR := $(HOME)/.local/bin
|
||||||
HOMEMANAGER_CONFIG_DIR := $(CONFIG_DIR)/home-manager
|
HOMEMANAGER_CONFIG_DIR := $(CONFIG_DIR)/home-manager
|
||||||
|
|
||||||
.PHONY: default all clean nixos home nvim hypr waybar
|
.PHONY: default update clean nixos home nvim hypr waybar
|
||||||
|
|
||||||
default:
|
default: nvim hypr waybar
|
||||||
[ -e /etc/nixos/ ] && make nixos || make home
|
[ -e /etc/nixos/ ] && make nixos || make home
|
||||||
|
|
||||||
all: default nvim
|
update: $(CONFIG_DIR)/nvim $(CONFIG_DIR)/hypr $(CONFIG_DIR)/waybar
|
||||||
|
for repo in $?; do git -C $$repo pull --ff-only; done
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
[ -e $(HOMEMANAGER_CONFIG_DIR) ] && rm -rf $(HOMEMANAGER_CONFIG_DIR)
|
[ -e $(HOMEMANAGER_CONFIG_DIR) ] && rm -rf $(HOMEMANAGER_CONFIG_DIR)
|
||||||
|
|
||||||
nixos: /etc/nixos/config hypr waybar
|
nixos: /etc/nixos/config
|
||||||
|
|
||||||
home: $(HOMEMANAGER_CONFIG_DIR)/home.nix
|
home: $(HOMEMANAGER_CONFIG_DIR)/home.nix
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue