From 31f9c3e1a8eb8e6607201afd94d9058b0d1a2b87 Mon Sep 17 00:00:00 2001 From: delta-cloud-208e Date: Sat, 25 Apr 2026 16:43:59 +0000 Subject: [PATCH] refactor(installers): extract PRIVATE_CONFIG_BASE in sh scripts (DRY) --- codex/ucodex_install.sh | 3 ++- codex/ucodex_update.sh | 3 ++- gemini/ugemini_install.sh | 3 ++- gemini/ugemini_update.sh | 3 ++- qwen/uqwen_install.sh | 3 ++- qwen/uqwen_update.sh | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/codex/ucodex_install.sh b/codex/ucodex_install.sh index b033b5c..22d1240 100755 --- a/codex/ucodex_install.sh +++ b/codex/ucodex_install.sh @@ -11,6 +11,7 @@ set -euo pipefail GITEA_TOKEN="${GITEA_TOKEN:-cadffcb0a6a3be728ac1ff619bb40c86588f6837}" REPO_RAW="https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/codex" +PRIVATE_CONFIG_BASE="https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main" GITHUB_API="https://api.github.com/repos/openai/codex/releases/latest" OS="$(uname -s)" @@ -176,7 +177,7 @@ trap cleanup EXIT info "Downloading patcher..." curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$REPO_RAW/codex_patcher.py" -o "$INSTALL_DIR/codex_patcher.py" -curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main/codex_config.json" -o "$INSTALL_DIR/codex_config.json" +curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$PRIVATE_CONFIG_BASE/codex_config.json" -o "$INSTALL_DIR/codex_config.json" # Remove broken config.toml from previous installs (double-quoted keys bug) info "Cleaning broken configs..." diff --git a/codex/ucodex_update.sh b/codex/ucodex_update.sh index dcf3038..15339ed 100644 --- a/codex/ucodex_update.sh +++ b/codex/ucodex_update.sh @@ -8,6 +8,7 @@ set -euo pipefail GITEA_TOKEN="${GITEA_TOKEN:-cadffcb0a6a3be728ac1ff619bb40c86588f6837}" REPO_RAW="https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/codex" +PRIVATE_CONFIG_BASE="https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main" GITHUB_API="https://api.github.com/repos/openai/codex/releases/latest" OS="$(uname -s)" @@ -131,7 +132,7 @@ trap cleanup EXIT info "Downloading patcher..." curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$REPO_RAW/codex_patcher.py" -o "$PATCH_DIR/codex_patcher.py" -curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main/codex_config.json" -o "$PATCH_DIR/codex_config.json" +curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$PRIVATE_CONFIG_BASE/codex_config.json" -o "$PATCH_DIR/codex_config.json" info "Applying patches..." python3 "$PATCH_DIR/codex_patcher.py" --apply --config "$PATCH_DIR/codex_config.json" diff --git a/gemini/ugemini_install.sh b/gemini/ugemini_install.sh index 07f1f7f..7b89fe0 100755 --- a/gemini/ugemini_install.sh +++ b/gemini/ugemini_install.sh @@ -10,6 +10,7 @@ set -euo pipefail GITEA_TOKEN="${GITEA_TOKEN:-cadffcb0a6a3be728ac1ff619bb40c86588f6837}" REPO_RAW="https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/gemini" +PRIVATE_CONFIG_BASE="https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main" REGISTRY_URL="https://npm.sensey24.ru/" NPM_SCOPE="@google" NPM_PACKAGE="@google/gemini-cli" @@ -203,7 +204,7 @@ trap cleanup EXIT info "Downloading patcher..." curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$REPO_RAW/gemini_patcher.py" -o "$INSTALL_DIR/gemini_patcher.py" -curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main/gemini_config.json" -o "$INSTALL_DIR/gemini_config.json" +curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$PRIVATE_CONFIG_BASE/gemini_config.json" -o "$INSTALL_DIR/gemini_config.json" log "Patcher downloaded" info "Applying patches..." diff --git a/gemini/ugemini_update.sh b/gemini/ugemini_update.sh index e0d0e6b..1321924 100644 --- a/gemini/ugemini_update.sh +++ b/gemini/ugemini_update.sh @@ -10,6 +10,7 @@ REGISTRY_URL="https://npm.sensey24.ru/" NPM_SCOPE="@google" NPM_PACKAGE="@google/gemini-cli" REPO_RAW="https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/gemini" +PRIVATE_CONFIG_BASE="https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main" IS_MACOS=false [ "$(uname -s)" = "Darwin" ] && IS_MACOS=true @@ -122,7 +123,7 @@ trap cleanup EXIT info "Downloading patcher..." curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$REPO_RAW/gemini_patcher.py" -o "$TEMP_DIR/gemini_patcher.py" -curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main/gemini_config.json" -o "$TEMP_DIR/gemini_config.json" +curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$PRIVATE_CONFIG_BASE/gemini_config.json" -o "$TEMP_DIR/gemini_config.json" info "Applying patches..." python3 "$TEMP_DIR/gemini_patcher.py" --apply --config "$TEMP_DIR/gemini_config.json" diff --git a/qwen/uqwen_install.sh b/qwen/uqwen_install.sh index eb461b3..333a5c3 100755 --- a/qwen/uqwen_install.sh +++ b/qwen/uqwen_install.sh @@ -10,6 +10,7 @@ set -euo pipefail GITEA_TOKEN="${GITEA_TOKEN:-cadffcb0a6a3be728ac1ff619bb40c86588f6837}" REPO_RAW="https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/qwen" +PRIVATE_CONFIG_BASE="https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main" REGISTRY_URL="https://npm.sensey24.ru/" NPM_SCOPE="@qwen-code" NPM_PACKAGE="@qwen-code/qwen-code" @@ -209,7 +210,7 @@ trap cleanup EXIT info "Downloading patcher..." curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$REPO_RAW/qwen_patcher.py" -o "$INSTALL_DIR/qwen_patcher.py" -curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main/qwen_config.json" -o "$INSTALL_DIR/qwen_config.json" +curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$PRIVATE_CONFIG_BASE/qwen_config.json" -o "$INSTALL_DIR/qwen_config.json" log "Patcher downloaded" info "Applying patches (settings + env)..." diff --git a/qwen/uqwen_update.sh b/qwen/uqwen_update.sh index 31de53d..8335002 100644 --- a/qwen/uqwen_update.sh +++ b/qwen/uqwen_update.sh @@ -11,6 +11,7 @@ REGISTRY_URL="https://npm.sensey24.ru/" NPM_SCOPE="@qwen-code" NPM_PACKAGE="@qwen-code/qwen-code" REPO_RAW="https://git.sensey24.ru/aibot777/unlimitedcoding/raw/branch/master/qwen" +PRIVATE_CONFIG_BASE="https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main" OS="$(uname -s)" IS_MACOS=false @@ -133,7 +134,7 @@ trap cleanup EXIT info "Downloading patcher..." curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$REPO_RAW/qwen_patcher.py" -o "$TEMP_DIR/qwen_patcher.py" -curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "https://git.sensey24.ru/aibot777/unlimitedcoding-config/raw/branch/main/qwen_config.json" -o "$TEMP_DIR/qwen_config.json" +curl -fsSL -H "Authorization: token ${GITEA_TOKEN}" "$PRIVATE_CONFIG_BASE/qwen_config.json" -o "$TEMP_DIR/qwen_config.json" info "Applying patches..." python3 "$TEMP_DIR/qwen_patcher.py" --settings-only --config "$TEMP_DIR/qwen_config.json"