mirror of
https://github.com/bestnite/quadlet-migrator-skill.git
synced 2026-04-26 19:21:53 +00:00
Add helper script templates and align reference guidance.
Point helper-script generation at shared templates, tighten prefix-based Quadlet handling, and refresh the bundled Quadlet reference formatting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
# Copy reviewed Quadlet unit files into the target Quadlet directory.
|
||||
# Update the variables below before using this template.
|
||||
|
||||
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
QUADLET_PREFIX='app-'
|
||||
QUADLET_TARGET_DIR="${HOME}/.config/containers/systemd"
|
||||
|
||||
list_quadlet_files() {
|
||||
for ext in container pod network volume build image kube; do
|
||||
for file in "$SCRIPT_DIR"/"$QUADLET_PREFIX"*."$ext"; do
|
||||
[ -e "$file" ] || continue
|
||||
printf '%s\n' "$file"
|
||||
done
|
||||
done | LC_ALL=C sort -u
|
||||
}
|
||||
|
||||
files=$(list_quadlet_files)
|
||||
[ -n "$files" ] || {
|
||||
printf 'No Quadlet files found for prefix %s\n' "$QUADLET_PREFIX" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
mkdir -p -- "$QUADLET_TARGET_DIR"
|
||||
printf '%s\n' "$files" | while IFS= read -r file; do
|
||||
install -m 0644 -- "$file" "$QUADLET_TARGET_DIR/$(basename -- "$file")"
|
||||
done
|
||||
Reference in New Issue
Block a user