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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user