Skip to content
Snippets Groups Projects
Verified Commit ea99d5bc authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

cli: Add build-if-not-exists command

This patch allows to optionally build the koolbox container on install
if it isn't already present on the system. This should make the usage as
part of the uplevel CLI easier.
parent fb492be3
No related branches found
No related tags found
No related merge requests found
...@@ -14,13 +14,17 @@ preflight: ...@@ -14,13 +14,17 @@ preflight:
command -v podman > /dev/null command -v podman > /dev/null
.PHONY: install .PHONY: install
install: preflight ## Install koolbox, the Kubernetes Toolbox for SI-Infrastructure install: preflight build-if-not-exists ## Install koolbox, the Kubernetes Toolbox for SI-Infrastructure
install -m 755 ./koolbox ~/bin/koolbox install -m 755 ./koolbox ~/bin/koolbox
.PHONY: build .PHONY: build
build: preflight ## Build container locally instead of using one from upstream build: preflight ## Build container locally instead of using one from upstream
podman build -t $(KOOLBOX_IMAGE) . podman build -t $(KOOLBOX_IMAGE) .
.PHONY: build-if-not-exists
build-if-not-exists: preflight
podman image exists $(KOOLBOX_IMAGE) || make build
.PHONY: config .PHONY: config
config: ## Edit your koolbox environment config config: ## Edit your koolbox environment config
${EDITOR} "${XDG_CONFIG_HOME}/koolbox/env" ${EDITOR} "${XDG_CONFIG_HOME}/koolbox/env"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment