fix: audit fixes across all install/update scripts

- codex/ucodex_update.sh: fix ${NC} → ${RESET} (crashed with set -u), fix CRLF
- gemini/ugemini_install.sh: read API_KEY/BASE_URL from config instead of hardcoded, fix "source ~/.bashrc" → "source /etc/profile.d/gemini-cli.sh"
- qwen/uqwen_install.sh: read API_KEY/BASE_URL from config instead of hardcoded

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
delta-cloud-208e
2026-03-08 10:43:06 +00:00
parent 77cde5d012
commit be048ee873
3 changed files with 135 additions and 135 deletions

View File

@@ -125,5 +125,5 @@ export OPENAI_BASE_URL="${BASE_URL}/v1"
info "Env vars set system-wide (/etc/environment + /etc/profile.d/codex-env.sh)" info "Env vars set system-wide (/etc/environment + /etc/profile.d/codex-env.sh)"
log "Update complete!" log "Update complete!"
echo -e "For current shell: ${CYAN}source /etc/profile.d/codex-env.sh${NC}" echo -e "For current shell: ${CYAN}source /etc/profile.d/codex-env.sh${RESET}"
echo "" echo ""

View File

@@ -193,8 +193,8 @@ fi
# ---- Set environment variables (system-wide, all users) ---- # ---- Set environment variables (system-wide, all users) ----
info "Setting environment variables..." info "Setting environment variables..."
API_KEY="ClauderAPI" API_KEY=$(python3 -c "import json; print(json.load(open('$INSTALL_DIR/gemini_config.json'))['api_key'])")
BASE_URL="https://ai.37-187-136-86.sslip.io" BASE_URL=$(python3 -c "import json; print(json.load(open('$INSTALL_DIR/gemini_config.json'))['base_url'])")
# Write to /etc/environment (all users, all sessions including cron) # Write to /etc/environment (all users, all sessions including cron)
ETC_ENV="/etc/environment" ETC_ENV="/etc/environment"
@@ -238,13 +238,13 @@ if echo "$RESULT" | grep -qi "OK"; then
echo " gemini-2.5-pro, gemini-2.5-flash" echo " gemini-2.5-pro, gemini-2.5-flash"
echo " gemini-3-flash, gemini-3.1-pro" echo " gemini-3-flash, gemini-3.1-pro"
echo "" echo ""
echo " If env vars not active, run: source ~/.bashrc" echo " If env vars not active, run: source /etc/profile.d/gemini-cli.sh"
echo "" echo ""
else else
warn "Patches applied but test prompt failed." warn "Patches applied but test prompt failed."
echo " Response: $RESULT" echo " Response: $RESULT"
echo "" echo ""
echo " Try manually:" echo " Try manually:"
echo " source ~/.bashrc" echo " source /etc/profile.d/gemini-cli.sh"
echo " gemini -p 'Hello'" echo " gemini -p 'Hello'"
fi fi

View File

@@ -169,8 +169,8 @@ log "Patches applied"
# ---- Set environment variables (system-wide, all users) ---- # ---- Set environment variables (system-wide, all users) ----
info "Setting environment variables..." info "Setting environment variables..."
API_KEY="ClauderAPI" API_KEY=$(python3 -c "import json; print(json.load(open('$INSTALL_DIR/qwen_config.json'))['api_key'])")
BASE_URL="https://ai.37-187-136-86.sslip.io" BASE_URL=$(python3 -c "import json; print(json.load(open('$INSTALL_DIR/qwen_config.json'))['base_url'])")
# Write to /etc/environment (all users, all sessions including cron) # Write to /etc/environment (all users, all sessions including cron)
ETC_ENV="/etc/environment" ETC_ENV="/etc/environment"