Compare commits
2 commits
ec8e088b3f
...
76bdf6dab6
Author | SHA1 | Date | |
---|---|---|---|
76bdf6dab6 | |||
5237a70f3e |
3 changed files with 22 additions and 2 deletions
20
Makefile
Normal file
20
Makefile
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
DESTDIR ?= /usr
|
||||||
|
BINDIR ?= $(DESTDIR)/bin
|
||||||
|
VARDIR ?= /var/lib/containerctl
|
||||||
|
GENERATEDIR ?= $(VARDIR)/generate
|
||||||
|
CONFIGDIR ?= $(VARDIR)/configs
|
||||||
|
CONTAINERDIR ?= $(VARDIR)/containers
|
||||||
|
|
||||||
|
install:
|
||||||
|
mkdir -p \
|
||||||
|
$(PREFIX)/$(GENERATEDIR) \
|
||||||
|
$(PREFIX)/$(CONFIGDIR) \
|
||||||
|
$(PREFIX)/$(CONTAINERDIR) \
|
||||||
|
$(PREFIX)/$(BINDIR)
|
||||||
|
install -m755 containerctl $(PREFIX)/$(BINDIR)
|
||||||
|
cp -t $(PREFIX)/$(GENERATEDIR) \
|
||||||
|
generate/container.py \
|
||||||
|
generate/log.py \
|
||||||
|
generate/generate.py
|
||||||
|
|
||||||
|
.PHONY: install
|
|
@ -1,6 +1,6 @@
|
||||||
version = 1
|
version = 1
|
||||||
[[annotations]]
|
[[annotations]]
|
||||||
path = [".gitignore", "example.container", "ruff.toml"]
|
path = [".gitignore", "example.container", "ruff.toml", "Makefile"]
|
||||||
precedence = "aggregate"
|
precedence = "aggregate"
|
||||||
SPDX-FileCopyrightText = "2025 Enno Tensing <tenno+containerctl@suij.in>"
|
SPDX-FileCopyrightText = "2025 Enno Tensing <tenno+containerctl@suij.in>"
|
||||||
SPDX-License-Identifier = "CC0-1.0"
|
SPDX-License-Identifier = "CC0-1.0"
|
||||||
|
|
|
@ -179,7 +179,7 @@ class Environment:
|
||||||
cmd = f"# Create env-file {self.file}\n"
|
cmd = f"# Create env-file {self.file}\n"
|
||||||
for var in self.variables:
|
for var in self.variables:
|
||||||
escaped_var = var.replace("'", "%b")
|
escaped_var = var.replace("'", "%b")
|
||||||
cmd += f"printf '{escaped_var}\\n' \"'\" >> '{self.file}'\n"
|
cmd += f"printf '{escaped_var}\\n' \"'\" \"'\">> '{self.file}'\n"
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue