Skip to content
1        10        20        30        40        50        60        70        80        901#!/bin/sh2set -eu34: "${OPENCODE_SERVER_PASSWORD:?OPENCODE_SERVER_PASSWORD must be set at runtime}"5: "${GIT_HOST:?GIT_HOST must be set at runtime}"6: "${GIT_USERNAME:?GIT_USERNAME must be set at runtime}"7: "${GIT_PASSWORD:?GIT_PASSWORD must be set at runtime}"89mkdir -p /workspace "$XDG_CONFIG_HOME/opencode" "$MISE_DATA_DIR" "$MISE_CONFIG_DIR"10if [ ! -e "$XDG_CONFIG_HOME/opencode/opencode.json" ]; then11  printf '{"shell":"/usr/local/bin/mise-shell","skills":["/usr/local/share/opencode/skills"]}\n' \12    > "$XDG_CONFIG_HOME/opencode/opencode.json"13fi14cd /workspace15git config --global credential.helper /usr/local/bin/git-credential-env16opencode service set password "$OPENCODE_SERVER_PASSWORD"17exec opencode "$@"