chore: local dev scripts
Signed-off-by: Dmytro Stanchiev <git@dmytros.dev>
This commit is contained in:
26
scripts/biome-symlink.sh
Executable file
26
scripts/biome-symlink.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Get the path to the system biome executable
|
||||
BIOME_PATH=$(which biome)
|
||||
|
||||
if [ -z "$BIOME_PATH" ]; then
|
||||
echo "Error: biome executable not found in PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Find all biome executables in node_modules
|
||||
files=$(fd biome node_modules --type executable --no-ignore --follow)
|
||||
|
||||
if [ -z "$files" ]; then
|
||||
echo "No biome executables found in node_modules"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Replace each with a symlink to the system biome
|
||||
for file in $files; do
|
||||
echo "Replacing $file with symlink to $BIOME_PATH"
|
||||
rm "$file"
|
||||
ln -s "$BIOME_PATH" "$file"
|
||||
done
|
||||
|
||||
echo "Done."
|
||||
Reference in New Issue
Block a user