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:
@@ -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)"
|
||||
|
||||
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 ""
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -169,8 +169,8 @@ log "Patches applied"
|
||||
# ---- 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/qwen_config.json'))['api_key'])")
|
||||
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)
|
||||
ETC_ENV="/etc/environment"
|
||||
|
||||
Reference in New Issue
Block a user