From 97b119b9a03f7b6fd4761cd3f68d0b0dfbb0f5c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Grondek?= Date: Tue, 5 Nov 2019 09:21:53 +0100 Subject: [PATCH] Added master makefile --- Makefile | 11 +++++++++++ packages/Makefile | 11 ++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ec5e7ab --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +SUB_DIRS=bash i3 packages ssh vim + +.PHONY: clean_install + +install: + @$(foreach dir,$(SUB_DIRS), $(MAKE) install -C $(dir);) + +clean: + @$(foreach dir,$(SUB_DIRS), $(MAKE) clean -C $(dir);) + +clean_install: clean install diff --git a/packages/Makefile b/packages/Makefile index a5c27a5..31251e6 100644 --- a/packages/Makefile +++ b/packages/Makefile @@ -2,13 +2,14 @@ PACKAGES=vim git traceroute command-not-found dnsutils firefox screen htop RM_PACKAGES=nano APT=aptitude +ROOT_APT=sudo $(APT) APTITUDE=/usr/bin/aptitude install: $(APTITUDE) - $(APT) update - $(APT) install -y $(PACKAGES) - $(APT) purge -y $(RM_PACKAGES) + $(ROOT_APT) update + $(ROOT_APT) install -y $(PACKAGES) + $(ROOT_APT) purge -y $(RM_PACKAGES) $(APTITUDE): - apt update - apt install -y $(APT) + sudo apt update + sudo apt install -y $(APT)