-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_gemini_config.sh
More file actions
37 lines (28 loc) · 838 Bytes
/
Copy pathsetup_gemini_config.sh
File metadata and controls
37 lines (28 loc) · 838 Bytes
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
#!/bin/bash
DOTFILES_GEMINI="$HOME/dotfiles/gemini"
GEMINI_DIR="$HOME/.gemini"
CONFIG_FILES=(
"settings.json"
)
echo "Setting up Gemini configuration symlinks..."
mkdir -p "$GEMINI_DIR"
for file in "${CONFIG_FILES[@]}"; do
SOURCE="$DOTFILES_GEMINI/$file"
TARGET="$GEMINI_DIR/$file"
if [ -e "$SOURCE" ]; then
if [ -e "$TARGET" ] && [ ! -L "$TARGET" ]; then
echo "Backing up existing $file to $file.backup"
mv "$TARGET" "$TARGET.backup"
fi
[ -L "$TARGET" ] && rm "$TARGET"
echo "Symlinking $file"
ln -s "$SOURCE" "$TARGET"
else
echo "Warning: $SOURCE not found, skipping"
fi
done
echo ""
echo "Gemini configuration setup complete!"
echo ""
echo "Symlinked files:"
find "$GEMINI_DIR" -maxdepth 1 -type l -lname "*$DOTFILES_GEMINI*" -ls