aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 318cf849c5ec9d3a74735bc6573ce92f962ff6a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.POSIX:

PREFIX  = $(HOME)/.local
INSTALL = install

ifeq ($(OS),Darwin)
	CONTAINER = container
else
	CONTAINER = podman
endif

IMAGE = ghcr.io/nlordell/dbx:latest

.PHONY: all
all:
	@echo "usage: make [install|container]"

.PHONY: install
install: dbx
	$(INSTALL) -d $(PREFIX)/bin
	$(INSTALL) -m 755 dbx $(PREFIX)/bin/dbx

.PHONY: container
container: container/Containerfile container/init
	$(CONTAINER) build --tag $(IMAGE) container

.PHONY: check
check: dbx
	shellcheck dbx
	shfmt -d dbx