Skip to content

Commit 9eb5a38

Browse files
committed
IntelliJ: intellij/install.sh -s symlinks instead of copies.
1 parent 3a4ceea commit 9eb5a38

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

prism/etc/intellij/install.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,26 @@ for arg in "$@"; do
1212
fi
1313
done
1414

15+
# Check for symlink flag
16+
SYMLINK=false
17+
for arg in "$@"; do
18+
if [ "$arg" == "--symlink" ] || [ "$arg" == "-s" ]; then
19+
SYMLINK=true
20+
fi
21+
done
22+
1523
copy_file() {
1624
local src="$1"
1725
local dest="$2"
1826
local display_path=${dest#"$PROJECT_ROOT/"}
1927
if [ -f "$dest" ] && [ "$FORCE" = false ]; then
2028
echo "⚠️ Skipping $display_path (already exists). Use -f to overwrite."
2129
else
22-
cp "$src" "$dest" && echo "✅ Installed $display_path"
30+
if [ "$SYMLINK" = false ]; then
31+
cp "$src" "$dest" && echo "✅ Installed $display_path"
32+
else
33+
rm "$dest" && ln -s "$src" "$dest" && echo "✅ Installed $display_path (symlink)"
34+
fi
2335
fi
2436
}
2537

0 commit comments

Comments
 (0)