summaryrefslogtreecommitdiff
path: root/docs/tutorial/scripts/sudo-keepalive.sh
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-06 09:42:43 +0300
committerPaul Buetow <paul@buetow.org>2026-05-06 09:42:43 +0300
commitd78a2530da91b76625b71c2aeaf3293abc6c3a4b (patch)
tree5d59a7a1014955564b9f2c30decaf6be257e61cf /docs/tutorial/scripts/sudo-keepalive.sh
parentfbb7c9a9ad8d03d5d095ac441a58b37537e0ab8d (diff)
move demo/ to docs/tutorial/, commit assets, consolidate TUI docs
- demo/ renamed to docs/tutorial/ (tapes, scripts, TUTORIAL.md) - docs/tutorial/assets/ added to git (51 MB of GIFs + PNGs); removed /demo/assets/ from .gitignore so images render on Codeberg - docs/tui-reference.md removed; its hotkey tables merged into a new "Hotkey Quick Reference" section at the end of TUTORIAL.md - TUTORIAL.md: updated install section (mage buildDocker, no GOTOOLCHAIN=auto), fixed README relative path (../../README.md), updated internal tapes/scripts/assets path prose - README.md: updated all demo/ image paths and links to docs/tutorial/; TUI and recording-modes links now point to TUTORIAL.md anchors - AGENTS.md: updated demo/ references to docs/tutorial/ - Magefile.go: updated demoDir/demoTapesDir/demoScriptsDir/demoRunTape/ demoSudoKeepers constants to docs/tutorial/ paths Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'docs/tutorial/scripts/sudo-keepalive.sh')
-rwxr-xr-xdocs/tutorial/scripts/sudo-keepalive.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/tutorial/scripts/sudo-keepalive.sh b/docs/tutorial/scripts/sudo-keepalive.sh
new file mode 100755
index 0000000..4ae1e27
--- /dev/null
+++ b/docs/tutorial/scripts/sudo-keepalive.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+# Refreshes the sudo timestamp every minute so a long demo regen never trips a
+# password prompt. Intended to be backgrounded by `mage demo` and killed at the
+# end of the run.
+
+set -u
+
+trap 'exit 0' TERM INT
+
+while true; do
+ sudo -n true 2>/dev/null || exit 1
+ sleep 60
+done