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

@@ -193,8 +193,8 @@ fi
# ---- Set environment variables (system-wide, all users) ----
info "Setting environment variables..."
API_KEY="ClauderAPI"
BASE_URL="https://ai.37-187-136-86.sslip.io"
API_KEY=$(python3 -c "import json; print(json.load(open('$INSTALL_DIR/gemini_config.json'))['api_key'])")
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)
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-3-flash, gemini-3.1-pro"
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 ""
else
warn "Patches applied but test prompt failed."
echo " Response: $RESULT"
echo ""
echo " Try manually:"
echo " source ~/.bashrc"
echo " source /etc/profile.d/gemini-cli.sh"
echo " gemini -p 'Hello'"
fi