aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: ca4d168e9c45d7c43aec2c9ecd3f242507ea1d00 (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
31
.POSIX:

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

OS ?= $(shell uname -s)
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 container/init container/stop
	shellcheck $^
	shfmt -d $^