Skip to content

Commit

Permalink
Update install.mk
Browse files Browse the repository at this point in the history
  • Loading branch information
mafen authored Mar 25, 2024
1 parent 6b34aa6 commit c054ba6
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions make.d/install.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,17 @@ install: build install-docker
cp --no-clobber .templates/env.template .env
$(EDITOR) .env

# fuck you debian
ifeq ($(shell lsb_release -si),"Ubuntu")
REPOS = rmescandon/yq ansible/ansible
else
REPOS = ansible/ansible
endif

REPOS = rmescandon/yq ansible/ansible
MISSING_REPOS := $(foreach repo,$(REPOS),$(if $(shell apt-cache policy | grep $(repo)),,addrepo/$(repo)))

EXECUTABLES = git nano jq yq python3-pip yamllint python3-pathspec ansible
MISSING_PACKAGES := $(foreach exec,$(EXECUTABLES),$(if $(shell dpkg -s "$(exec)" &> /dev/null),,addpackage-$(exec)))

# duck you debian
addrepo/%:
sudo apt-add-repository ppa:$* -y
@if [ "$(shell lsb_release -si | tail -n 1)" = "Ubuntu" ]; then \
sudo apt-add-repository ppa:$* -y; \
fi

addpackage-%:
sudo apt install $* -y
Expand Down

0 comments on commit c054ba6

Please sign in to comment.