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