Fix write_readme missing from standalone bootstrap fallback

When run directly without setup.sh, write_readme is not defined.
Add a minimal implementation to the else block of both kyber-server.sh
and sunshine.sh so standalone runs no longer fail with command not found.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D8ckUJQtj1pH8jtAddBDZs
This commit is contained in:
Claude
2026-06-26 05:07:11 +00:00
parent 7d3cd46d9d
commit 1087b59424
2 changed files with 14 additions and 0 deletions
+7
View File
@@ -498,6 +498,13 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
generate_password() { tr -dc 'A-Za-z0-9' </dev/urandom | head -c "${1:-32}"; }
write_readme() {
local _dir="$1"; shift
[[ "$DRY_RUN" == "true" ]] && return 0
mkdir -p "$_dir"
cat > "$_dir/README.md"
}
ACTUAL_USER="${SUDO_USER:-$USER}"
ACTUAL_HOME=$(eval echo "~$ACTUAL_USER")
DOCKER_DIR="$ACTUAL_HOME/docker"
+7
View File
@@ -403,6 +403,13 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
eval "$_var='${_r:-$_def}'"
}
write_readme() {
local _dir="$1"; shift
[[ "$DRY_RUN" == "true" ]] && return 0
mkdir -p "$_dir"
cat > "$_dir/README.md"
}
ACTUAL_USER="${SUDO_USER:-$USER}"
ACTUAL_HOME=$(eval echo "~$ACTUAL_USER")
DOCKER_DIR="$ACTUAL_HOME/docker"