d817c37652
gates / consistency-and-conventions (push) Successful in 26s
17-point code-level audit executed via Explorer->Architect->Builder->Tester->Reviewer;
Reviewer accepted (APPROVE_WITH_NOTES; 3 block-list items resolved):
- security: telegram sender-owner AND-gate + TELEGRAM_OWNER_ID, matrix
MATRIX_ROOM_ID fail-closed, gpg --passphrase-fd 3 (no argv secret),
/dev/tcp positional-arg form (checkport/smb-client/share-lib/NET_PROBE),
eval deny-by-default + --no-command-execution carried by both chat bridges,
tty-gated --trust; config/{telegram,matrix}.env reference templates
- ai: all ExecStart flags validated against installed llama.cpp
(requested->error, default->omit+warn, CONFIG_REQUESTED_FLAGS); single-file
hf download failure rc=1 + no .hf-meta; LLAMACPP_HOST coherent;
POS_SUBCMDS + metadata gaps closed
- tooling: lint-conventions Bash-native rewrite (~24-30x faster, rules and
output byte-identical, :num restored); pos system uninstall covers all 12
libs + scale-tail + flags dir + systemd user units (|| true) + plugin
markers; anchored .bash_completion/.bashrc removal replaces sed -i '/pos/d'
- config: canonical load_env_file in lib/config-ui.sh (CRLF strip, env-wins,
XDG, LOADED_ENV_KEYS); 9 tools migrated; entertainment-lib collapsed to
wrappers; docker-compose deliberately unmigrated (source semantics)
- tests: first committed regression suite — tests/run-tests.sh zero-dep
runner + make test; 12 files / 179 checks / 0 skip / ~52s; hard skip
contract; systemd-analyze verify on generated unit PASS
Verified: make gen idempotent; make check green; make lint 0 FAIL, 0 WARN;
make test green; bash -n clean; git diff --check clean. Audit deliverables +
agent reports + AGENT_TODO Done entry included.
68 lines
3.0 KiB
Bash
Executable File
68 lines
3.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# ────────────────────────────────────────────────────────────────
|
|
# TEMPLATE — new optional app installer
|
|
#
|
|
# 1. Copy: cp templates/app.sh apps/<category>/<name>.sh
|
|
# Categories: ai, browsers, development, media, networking,
|
|
# remote-access, system, utilities.
|
|
# 2. Fill in install_myapp() / uninstall_myapp() (rename to your app).
|
|
# 3. Docs: add a row to the catalog table in DOC/APPS.md.
|
|
#
|
|
# Auto-appears in the `apps/install.sh` picker — no registration.
|
|
# Run as: bash apps/install.sh <name> (install)
|
|
# bash apps/install.sh --uninstall <name>
|
|
# ────────────────────────────────────────────────────────────────
|
|
|
|
source "$(dirname "$0")/../../lib/common.sh"
|
|
|
|
install_myapp() {
|
|
command -v myapp &>/dev/null && { log "myapp already installed"; return 0; }
|
|
|
|
# Pick one method (see conventions below) and wrap it in spawn:
|
|
spawn "Installing myapp" sudo apt install -y myapp
|
|
|
|
log "Run myapp: myapp"
|
|
}
|
|
|
|
uninstall_myapp() {
|
|
command -v myapp &>/dev/null || { log "myapp not installed"; return 0; }
|
|
|
|
spawn "Removing myapp" sudo apt purge -y myapp
|
|
spawn "Cleaning up dependencies" sudo apt autoremove -y
|
|
}
|
|
|
|
case "${1:-}" in
|
|
uninstall) uninstall_myapp ;;
|
|
*) install_myapp ;;
|
|
esac
|
|
|
|
# ────────────────────────────────────────────────────────────────
|
|
# CONVENTIONS — pick the install method that fits:
|
|
#
|
|
# APT package sudo apt install -y myapp
|
|
# remove: sudo apt purge -y myapp + apt autoremove -y
|
|
#
|
|
# Repo-based app add the apt repo in install; in uninstall also
|
|
# remove the .list file and keyring:
|
|
# sudo rm -f /etc/apt/sources.list.d/myapp.list /usr/share/keyrings/...
|
|
#
|
|
# Official script spawn "Installing myapp" bash -c "curl -fsSL https://.../install.sh | sh"
|
|
# uninstall: remove the installed binary/files
|
|
#
|
|
# Flatpak sudo flatpak install -y flathub <app-id>
|
|
# remove: sudo flatpak uninstall -y <app-id>
|
|
#
|
|
# .deb download download to temp, sudo apt install -y ./file.deb
|
|
#
|
|
# File/AppImage install under /opt/<app>; in uninstall remove the
|
|
# files, symlinks, and desktop entries
|
|
#
|
|
# usermod for groups sudo usermod -aG <group> "$USER" + print a
|
|
# re-login reminder
|
|
#
|
|
# Every app MUST be idempotent (guard install AND uninstall) and MUST
|
|
# provide uninstall_myapp() + the uninstall case dispatch above.
|
|
# ────────────────────────────────────────────────────────────────
|