From 2bf5f937025d59cb2e2d423d5a8a5cb0b5634f5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Grondek?= Date: Tue, 12 Nov 2019 09:03:19 +0100 Subject: [PATCH] [packages] Small refactor and add tmux --- packages/Makefile | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/packages/Makefile b/packages/Makefile index 31251e6..fd14fa5 100644 --- a/packages/Makefile +++ b/packages/Makefile @@ -1,15 +1,46 @@ -PACKAGES=vim git traceroute command-not-found dnsutils firefox screen htop +PACKAGES=traceroute command-not-found dnsutils RM_PACKAGES=nano APT=aptitude ROOT_APT=sudo $(APT) APTITUDE=/usr/bin/aptitude -install: $(APTITUDE) +VIM=/usr/bin/vim +GIT=/usr/bin/git +FIREFOX=/usr/bin/firefox +SCREEN=/usr/bin/screen +HTOP=/usr/bin/htop +TMUX=/usr/bin/tmux + +INSTALL=$(ROOT_APT) install -y + +install: $(APTITUDE) $(VIM) $(GIT) $(FIREFOX) $(SCREEN) $(HTOP) $(TMUX) $(ROOT_APT) update - $(ROOT_APT) install -y $(PACKAGES) + $(INSTALL) $(PACKAGES) $(ROOT_APT) purge -y $(RM_PACKAGES) $(APTITUDE): sudo apt update sudo apt install -y $(APT) + +$(VIM): $(APTITUDE) + $(INSTALL) vim + +$(GIT): $(APTITUDE) + $(INSTALL) git + +$(FIREFOX): $(APTITUDE) +ifeq ($(shell lsb_release -i -s), 'Ubuntu') + $(INSTALL) firefox +else + $(INSTALL) firefox-esr +endif + +$(SCREEN): $(APTITUDE) + $(INSTALL) screen + +$(HTOP): $(APTITUDE) + $(INSTALL) htop + +$(TMUX): $(APTITUDE) + $(INSTALL) tmux