Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Thumbs.db
.idea/
.vscode/
__pycache__/
*.pyc
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ missing desktop pieces, and applies a Graphite Amber identity.

## Entry points

- `run.sh` runs a fixed ordered list of `scripts/[0-9][0-9]-*.sh` steps.
- `install.sh` runs a fixed ordered list of `scripts/[0-9][0-9]-*.sh` steps.
- `install.sh` is the unattended wrapper.
- `scripts/verifySetup.sh` is the read-only end-state audit.

Expand All @@ -28,4 +28,4 @@ missing desktop pieces, and applies a Graphite Amber identity.

- `bash -n` on changed shell files.
- `bash scripts/verifySetup.sh` on a target system.
- `bash run.sh --list` after adding or renaming a step.
- `bash install.sh --list` after adding or renaming a step.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Small changes, small pull requests.
1. Branch from `main`.
2. Make one complete change.
3. Use a Conventional Commit style title: `feat:`, `fix:`, `docs:`, `chore:`, `ci:`, `security:`.
4. Run `./run.sh --verify` before opening a pull request.
4. Run `./install.sh --verify` before opening a pull request.
5. Let the read-only CI checks pass, then squash-merge.

No tests. Validation means parsers, syntax checks and the read-only verifier above.
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ takes an existing devuan cinnamon desktop past stock defaults with a graphite am
| | |
| --- | --- |
| **steps** | ten numbered steps replace the old 33 per-feature scripts. each still runs standalone. |
| **runner** | `./install.sh` runs all ten unattended. `./run.sh` asks before each step. |
| **runner** | `./install.sh` runs all ten unattended. `./install.sh` asks before each step. |
| **theme** | gtk apps, terminal and update window share one graphite amber palette. |
| **init** | native to openrc. no systemctl in the tree. |

Expand All @@ -20,12 +20,12 @@ cd devuan-cinnamon-setup
bash install.sh # everything, fully unattended (runs a verify pass at the end)
bash install.sh --no-verify # skip the end-state audit
# or the runner directly:
bash run.sh # run all 10 steps (deterministic, no prompts)
bash run.sh --list # show the ordered steps
bash run.sh --only 05 # run a single script by number
bash run.sh --no-update # skip the apt-get update up front
bash run.sh --verify # run scripts/verifySetup.sh (end-state audit) afterwards
bash run.sh --backup # snapshot current config via scripts/configBackup.sh first
bash install.sh # run all 10 steps (deterministic, no prompts)
bash install.sh --list # show the ordered steps
bash install.sh --only 05 # run a single script by number
bash install.sh --no-update # skip the apt-get update up front
bash install.sh --verify # run scripts/verifySetup.sh (end-state audit) afterwards
bash install.sh --backup # snapshot current config via scripts/configBackup.sh first
```

Run as your **normal user**, never `/root` and never `sudo bash ...`.
Expand Down
2 changes: 1 addition & 1 deletion install.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ done
if [ "$NO_VERIFY" -eq 0 ]; then
EXTRA+=(--verify)
fi
exec bash "$SCRIPT_DIR/run.sh" "${EXTRA[@]}"
exec bash "$SCRIPT_DIR/lib/runner.sh" "${EXTRA[@]}"
Binary file not shown.
Binary file removed lib/__pycache__/dconf-list-add.cpython-313.pyc
Binary file not shown.
Binary file removed lib/__pycache__/dconf-list-remove.cpython-313.pyc
Binary file not shown.
Binary file removed lib/__pycache__/install-spice.cpython-313.pyc
Binary file not shown.
Binary file removed lib/__pycache__/panel-applet-add.cpython-313.pyc
Binary file not shown.
Binary file removed lib/__pycache__/set-panel-layout.cpython-313.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ purge_if_installed() {
}

# Refresh apt package lists exactly once per run. Honors
# DEBSWAY_SKIP_APT_UPDATE=1 (set automatically by run.sh/install.sh after the
# DEBSWAY_SKIP_APT_UPDATE=1 (set automatically by install.sh/install.sh after the
# first successful refresh so the remaining ~15 steps don't re-refresh).
apt_update() {
if [ "${DEBSWAY_SKIP_APT_UPDATE:-0}" = "1" ]; then
Expand Down Expand Up @@ -173,7 +173,7 @@ service_restart() {
esac
}

ACTUAL_USER="${SUDO_USER:-$USER}"
ACTUAL_USER="${SUDO_USER:-${USER:-$(id -un)}}"
run_as_user() {
if [ "$(id -un)" = "$ACTUAL_USER" ]; then
"$@"
Expand Down
45 changes: 24 additions & 21 deletions run.sh → lib/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@
# the apps that 06+ finish wiring up).
#
# Usage:
# bash run.sh # run everything
# bash run.sh --yes # same as above (DEBSWAY_ASSUME_YES=1, default)
# bash run.sh --list # just show the ordered steps
# bash run.sh --only 05 # run a single script by number
# bash run.sh --no-update # skip apt-get update up front
# bash run.sh --verify # run scripts/verifySetup.sh afterwards
# bash run.sh --backup # run scripts/configBackup.sh first
# bash install.sh # run everything
# bash install.sh --yes # same as above (DEBSWAY_ASSUME_YES=1, default)
# bash install.sh --list # just show the ordered steps
# bash install.sh --only 05 # run a single script by number
# bash install.sh --no-update # skip apt-get update up front
# bash install.sh --verify # run scripts/verifySetup.sh afterwards
# bash install.sh --backup # run scripts/configBackup.sh first
# ==========================================

set -uo pipefail
# NOTE: intentionally not using `set -e` - one script failing (say, a flaky
# download in an installer step) shouldn't abort every later step. Each
# script exits non-zero on failure so this runner can report it and carry on.
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
SCRIPTS_DIR="$SCRIPT_DIR/scripts"

# shellcheck source=lib/common.sh
Expand All @@ -37,7 +37,7 @@ source "$SCRIPT_DIR/lib/common.sh"
# ~/.local/bin) must land in the real user's $HOME, not /root. Scripts call
# sudo themselves for the parts that need it.
if [ "$(id -u)" -eq 0 ] && [ -z "${SUDO_USER:-}" ]; then
echo -e "${RED}Please run this as your normal user, not as root / sudo bash run.sh.${NC}"
echo -e "${RED}Please run this as your normal user, not as root / sudo bash install.sh.${NC}"
echo -e "${YELLOW}Each script will call sudo itself for the parts that need it.${NC}"
exit 1
fi
Expand Down Expand Up @@ -69,14 +69,17 @@ for arg in "$@"; do
done

# --- Distro check (Devuan or Debian; both ship /etc/debian_version) ---
if [ -f /etc/devuan_version ]; then
echo -e "${GREEN}Devuan detected: $(cat /etc/devuan_version)${NC}"
elif [ -f /etc/debian_version ]; then
echo -e "${YELLOW}Debian-based system detected: $(cat /etc/debian_version) (not Devuan - most of this should still work)${NC}"
else
echo -e "${YELLOW}Warning: this toolkit targets Devuan/Debian. Your system may not be compatible.${NC}"
read -r -p "Continue anyway? (y/N): " continue_anyway
[[ "$continue_anyway" =~ ^[Yy]$ ]] || exit 1
# --list is read-only and host-independent, so it skips the compatibility gate.
if [ "$SHOW_LIST" -eq 0 ]; then
if [ -f /etc/devuan_version ]; then
echo -e "${GREEN}Devuan detected: $(cat /etc/devuan_version)${NC}"
elif [ -f /etc/debian_version ]; then
echo -e "${YELLOW}Debian-based system detected: $(cat /etc/debian_version) (not Devuan - most of this should still work)${NC}"
else
echo -e "${YELLOW}Warning: this toolkit targets Devuan/Debian. Your system may not be compatible.${NC}"
read -r -p "Continue anyway? (y/N): " continue_anyway
[[ "$continue_anyway" =~ ^[Yy]$ ]] || exit 1
fi
fi

# --- Init system check ---
Expand Down Expand Up @@ -124,7 +127,7 @@ if [ "$SHOW_LIST" -eq 1 ]; then
echo -e "${BLUE}Devuan Cinnamon Setup - ordered steps:${NC}"
show_list
echo
echo -e "${YELLOW}Run everything with: bash run.sh${NC}"
echo -e "${YELLOW}Run everything with: bash install.sh${NC}"
exit 0
fi

Expand All @@ -135,7 +138,7 @@ STATE_LOG="$STATE_DIR/last-run.log"
record_run() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" >> "$STATE_LOG"
}
record_run "run.sh start (flags: $*) init=$(init_system)"
record_run "install.sh start (flags: $*) init=$(init_system)"

FAILED=()

Expand Down Expand Up @@ -224,9 +227,9 @@ fi
if [ "${#FAILED[@]}" -gt 0 ]; then
echo -e "${RED}Failed: ${FAILED[*]}${NC}"
echo -e "${YELLOW}Re-run individual scripts with: bash scripts/<name>.sh${NC}"
record_run "run.sh end: FAILED=${FAILED[*]}"
record_run "install.sh end: FAILED=${FAILED[*]}"
exit 1
fi

record_run "run.sh end: all OK"
record_run "install.sh end: all OK"
echo -e "${GREEN}Done. A logout/reboot is recommended (groups, theme, compositor, shell all benefit from a fresh session).${NC}"
2 changes: 1 addition & 1 deletion scripts/05-cinnamonSetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ remove_extension() {
# from org.cinnamon enabled-extensions (idempotent).
local uuid="$1" label="$2"
if [ -d "$EXT_DIR/$uuid" ]; then
rm -rf "$EXT_DIR/$uuid"
rm -rf "${EXT_DIR:?}/${uuid:?}"
log_ok "$label removed."
else
log_info "$label not present - nothing to remove."
Expand Down
2 changes: 1 addition & 1 deletion scripts/systemUpdate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# -------------------------------------------------------
# The "update everything before you start" step the essentials video
# opens with. Deliberately its own script rather than baked silently
# into run.sh's startup, so it's still just an ordinary y/N step you can
# into install.sh's startup, so it's still just an ordinary y/N step you can
# skip if you'd rather update later or on your own schedule.
# =======================================================
set -uo pipefail
Expand Down
2 changes: 1 addition & 1 deletion scripts/verifySetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# group membership, key packages, fonts, Firefox user.js,
# enabled services, the Cinnamon spices this kit installs,
# and the persistent palette marker. Designed to be run from
# run.sh --verify after a run, or standalone at any time.
# install.sh --verify after a run, or standalone at any time.
#
# Prints PASS/FAIL/WARN lines and exits non-zero if any
# critical check failed, so it can gate CI/ISO validation.
Expand Down
6 changes: 3 additions & 3 deletions skills/devuan-cinnamon-SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ following in mind for any system-level help you give:
```
devuan-cinnamon-setup/
├── install.sh # one-command unattended installer (runs --verify at the end)
├── run.sh # ordered runner: --list / --only N / --yes / --no-update / --verify / --backup
├── install.sh # ordered runner: --list / --only N / --yes / --no-update / --verify / --backup
├── lib/ # shared helpers (see "Init system" + "DEBSWAY_*" vars)
│ ├── common.sh # ask/log/apt_update/service/power/gsettings helpers (+ cinnamon_custom_binding)
│ ├── theme-apply.sh # palette-driven app-theme appliers
Expand All @@ -98,8 +98,8 @@ devuan-cinnamon-setup/
├── config/ # palette, templates, eza/bat themes, menu app
├── scripts/ # ten numbered, independently runnable steps
│ ├── 01-systemSetup.sh ... 10-aiAgents.sh
│ ├── verifySetup.sh # end-state audit (run.sh --verify)
│ ├── configBackup.sh # snapshot/restore per-user config (run.sh --backup)
│ ├── verifySetup.sh # end-state audit (install.sh --verify)
│ ├── configBackup.sh # snapshot/restore per-user config (install.sh --backup)
│ └── policies.json # Firefox enterprise policy used by 08
├── skills/ # this file
└── butterbash/ # bundled shell QoL layer
Expand Down