format
This commit is contained in:
@@ -125,7 +125,7 @@ create_settings_file() {
|
||||
local api_key="$2"
|
||||
|
||||
# Write to .env file
|
||||
cat <<EOF > "$GEMINI_ENV_FILE"
|
||||
cat <<EOF >"$GEMINI_ENV_FILE"
|
||||
GOOGLE_GEMINI_BASE_URL="$base_url"
|
||||
GEMINI_API_KEY="$api_key"
|
||||
GEMINI_MODEL="gemini-3-pro-preview"
|
||||
@@ -134,7 +134,7 @@ EOF
|
||||
|
||||
# Write to settings.json
|
||||
local settings_json_path="$GEMINI_CONFIG_DIR/settings.json"
|
||||
cat <<EOF > "$settings_json_path"
|
||||
cat <<EOF >"$settings_json_path"
|
||||
{
|
||||
"general": {
|
||||
"previewFeatures": true
|
||||
@@ -179,20 +179,20 @@ main() {
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
-k|--key)
|
||||
api_key="$2"
|
||||
shift 2
|
||||
;;
|
||||
-t|--test)
|
||||
test_only=true
|
||||
shift
|
||||
;;
|
||||
-s|--show)
|
||||
show_settings=true
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
cat <<EOF
|
||||
-k | --key)
|
||||
api_key="$2"
|
||||
shift 2
|
||||
;;
|
||||
-t | --test)
|
||||
test_only=true
|
||||
shift
|
||||
;;
|
||||
-s | --show)
|
||||
show_settings=true
|
||||
shift
|
||||
;;
|
||||
-h | --help)
|
||||
cat <<EOF
|
||||
Usage: $0 [OPTIONS]
|
||||
|
||||
This script automatically tests multiple API endpoints and selects the working one:
|
||||
@@ -216,13 +216,13 @@ Interactive mode (no arguments):
|
||||
Environment Variables:
|
||||
API_KEY API key for authentication
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
print_error "Unknown option: $1"
|
||||
print_info "Use --help for usage information"
|
||||
exit 1
|
||||
;;
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
print_error "Unknown option: $1"
|
||||
print_info "Use --help for usage information"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user