bootstrap: self-elevate sudo; document double-click workflow

Added exec sudo bash self-elevation so bootstrap.sh works correctly when
double-clicked ("Run in Terminal") without the user needing to prefix sudo.
If already root, the check is a no-op.

Removed bootstrap.desktop — too fragile across desktop environments.
README now covers both "Open in Terminal" and double-click paths.

https://claude.ai/code/session_01Y4dMKtkqkpvmgDKoRdzhTG
This commit is contained in:
Claude
2026-06-04 01:14:54 +00:00
parent 39280d71cb
commit 8ffebe9a5a
2 changed files with 14 additions and 10 deletions
+5
View File
@@ -17,6 +17,11 @@
# connected machine, put the directory on a USB drive, done.
set -euo pipefail
# Self-elevate: if double-clicked or run without sudo, ask for password.
if [ "$(id -u)" -ne 0 ]; then
exec sudo bash "$0" "$@"
fi
REPO_URL="https://github.com/outis1one/ubuntu-post-install.git"
# Resolve actual user home when running under sudo