bootstrap.sh self-elevates with sudo; USB install docs rewritten
bootstrap.sh: add self-elevation — if not root, re-exec under sudo.
Double-clicking the script in GNOME ("Run in Terminal") now prompts for
the sudo password automatically, no extra commands needed.
README: rewrite USB section around the real workflow:
- clone with "Open in Terminal" from the file manager sidebar
- Option A: right-click folder → Open in Terminal → sudo ./setup.sh
- Option B: double-click bootstrap.sh → "Run in Terminal?" → sudo prompt
- note on nautilus-extension-gnome-terminal and exFAT vs ext4
https://claude.ai/code/session_017WJtGcE5jjerAQCUBWUE3H
This commit is contained in:
@@ -4,12 +4,20 @@
|
||||
# One command to paste into a new Ubuntu box:
|
||||
# curl -fsSL https://raw.githubusercontent.com/outis1one/ubuntu-post-install/main/bootstrap.sh | sudo bash
|
||||
#
|
||||
# Or double-click it in the file manager ("Run in Terminal") — it will
|
||||
# prompt for your sudo password automatically.
|
||||
#
|
||||
# What it does:
|
||||
# 1. Installs git if missing (the only hard dependency)
|
||||
# 2. Clones (or updates) the repo to ~/ubuntu-post-install
|
||||
# 3. Launches the interactive setup wizard
|
||||
set -euo pipefail
|
||||
|
||||
# Self-elevate: if not root, re-exec under sudo so a plain double-click works.
|
||||
if [ "${EUID:-$(id -u)}" -ne 0 ]; then
|
||||
exec sudo bash "$0" "$@"
|
||||
fi
|
||||
|
||||
REPO_URL="https://github.com/outis1one/ubuntu-post-install.git"
|
||||
DEST="${HOME:-/root}/ubuntu-post-install"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user