# Tutorial This is one path from an empty scratch prefix to a published generation and back. It uses `docs/examples/eb-standin`, a program that answers the two requests the tool sends to EasyBuild: a `--dry-run` module line for `demo/1`, and an install under `--installpath-software` and `--installpath-modules`. The same `eb-staged-rebuild` flags apply when `--eb` names the site `eb`. The commands below are what `docs/examples/walkthrough.sh` runs. The output blocks are from one run of that script with `WALKTHROUGH_ROOT=/tmp/ebsr-docs-prefix` on an ext4 filesystem. `bwrap` was absent, the user-namespace sandbox was usable, and `RENAME_EXCHANGE` succeeded. `user.max_user_namespaces` on that host was 192727. ## Create the live install The tool rebuilds a real directory that already exists. It refuses to create `software//`. ```bash SOFTWARE=/tmp/ebsr-docs-prefix/software MODULES=/tmp/ebsr-docs-prefix/modules STATE=/tmp/ebsr-docs-prefix/.eb-staged-rebuild STANDIN=/path/to/eb-staged-rebuild/docs/examples/eb-standin chmod +x "$STANDIN" mkdir -p "$SOFTWARE/demo/1/easybuild" "$MODULES/all/demo" printf 'payload-v1\n' > "$SOFTWARE/demo/1/PAYLOAD" printf "name = 'demo'\nversion = '1'\n" > "$SOFTWARE/demo/1/easybuild/demo-1.eb" cat > "$MODULES/all/demo/1.lua" </software --installpath-modules=/tmp/ebsr-docs-prefix/.eb-staged-rebuild/generations//modules demo-1.eb --robot --rebuild ``` Dry-run writes no journal and does not call EasyBuild. The staged command is the install-path form, with `--rebuild` added because the arguments did not already contain `--rebuild`, `--force`, or `-f`. ## Publish, then roll back The operator sequence, including a failed build, `resume`, `retire`, `rollback`, and `gc`, is {doc}`../howto/rebuild` and {doc}`../howto/recover`. Running the script end to end prints the same transcript: ```bash WALKTHROUGH_ROOT=/tmp/ebsr-docs-prefix docs/examples/walkthrough.sh ``` On the recorded run, `resume` of the failed id `demo-run` printed `swapped all/demo/1.lua (renameat2-exchange)` and the live `PAYLOAD` became `payload-v2`. `rollback demo-run` restored `payload-v1` and left the replacement at `software/demo/.1.demo-run`. `resolve` on the published module printed: ```text { "complete": true, "kind": "file", "path": "/tmp/ebsr-docs-prefix/modules/all/demo/1.lua", "root": "/tmp/ebsr-docs-prefix/software/demo/1", "root_kind": "dir", "syntax": "lua" } ``` The generation directory and the exchange are in {doc}`../topics/staging`. Prepare, the ledger flag, and the publication order are in {doc}`../howto/rebuild`. Every flag is in {doc}`../reference/cli`.