From 0dd248601338f18743e3bc9e9e00e3e3d63afada Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 25 May 2023 10:00:49 +0100 Subject: [PATCH] Add update command to Makefile to pull external repos --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 5f335686..8d6d211a 100644 --- a/Makefile +++ b/Makefile @@ -8,17 +8,18 @@ CONFIG_DIR := $(if $(XDG_CONFIG_HOME), $(XDG_CONFIG_HOME), $(HOME)/.config) BIN_DIR := $(HOME)/.local/bin 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 -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: [ -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