cupsadmin: CLI, CupsKit, app in progress

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kfattic
2026-09-16 13:13:07 -05:00
commit eba94aae4e
44 changed files with 7256 additions and 0 deletions

17
pkg/postinstall Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
# cupsadmin postinstall (payload-free pkg): the binary ships in the Scripts archive next to this file.
# Never changes ownership/permissions of an existing /usr/local/bin (Homebrew on Intel owns it).
set -euo pipefail
TARGET="${3:-/}"
DEST_DIR="${TARGET%/}/usr/local/bin"
SOURCE="$(cd "$(dirname "$0")" && pwd)/cupsadmin"
if [ ! -d "$DEST_DIR" ]; then
mkdir -p -m 755 "$DEST_DIR"
echo "cupsadmin: created $DEST_DIR"
fi
# -S: copy to a temp file and rename, so a running cupsadmin is never half-written.
install -S -m 755 -o root -g wheel "$SOURCE" "$DEST_DIR/cupsadmin"
echo "cupsadmin: installed $DEST_DIR/cupsadmin"