-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·42 lines (33 loc) · 1.2 KB
/
install.sh
File metadata and controls
executable file
·42 lines (33 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# Model Switcher Installation Script
# This script installs model configuration files to ~/.claude/my-models/
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TARGET_DIR="$HOME/.claude/my-models"
# Check for config files
if ! ls my-models/*.json >/dev/null 2>&1; then
echo "Error: No JSON configuration files found in my-models/"
exit 1
fi
echo "Installing model configurations..."
# Create target directory
mkdir -p "$TARGET_DIR"
# Copy config files (skip if already exist)
for config_file in my-models/*.json; do
if [ -f "$config_file" ]; then
target_file="$TARGET_DIR/$(basename "$config_file")"
if [ -f "$target_file" ]; then
echo "Skipping (already exists): $config_file"
else
cp "$config_file" "$target_file"
chmod 644 "$target_file"
echo "Installed: $config_file"
fi
fi
done
# Install switch-cc-model command
echo "Installing switch-cc-model command..."
sudo cp "$SCRIPT_DIR/switch-cc-model.py" "/usr/local/bin/switch-cc-model"
sudo chmod +x "/usr/local/bin/switch-cc-model"
echo "Installation complete. Configurations are in: $TARGET_DIR"
echo "Command 'switch-cc-model' is now available."