@mallardbay/cursor-rules 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/setup-cursor.sh +5 -4
- package/package.json +1 -1
package/bin/setup-cursor.sh
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# setup-cursor.sh
|
|
3
|
-
#
|
|
3
|
+
# Robust Cursor rules installer using realpath
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
@@ -12,8 +12,9 @@ if [ -z "$ENV_TYPE" ]; then
|
|
|
12
12
|
exit 1
|
|
13
13
|
fi
|
|
14
14
|
|
|
15
|
-
#
|
|
16
|
-
|
|
15
|
+
# Resolve the true path of the script, following symlinks
|
|
16
|
+
SCRIPT_PATH="$(realpath "$0")"
|
|
17
|
+
SRC_DIR="$(cd "$(dirname "$SCRIPT_PATH")/.." && pwd)"
|
|
17
18
|
SHARED_DIR="$SRC_DIR/.cursor/shared/rules"
|
|
18
19
|
ENV_DIR="$SRC_DIR/.cursor/$ENV_TYPE/rules"
|
|
19
20
|
|
|
@@ -29,7 +30,7 @@ fi
|
|
|
29
30
|
|
|
30
31
|
mkdir -p .cursor/rules
|
|
31
32
|
|
|
32
|
-
# Copy shared and env-specific rules into local project
|
|
33
|
+
# Copy all shared and env-specific rules into the local project
|
|
33
34
|
cp "$SHARED_DIR"/*.mdc .cursor/rules/
|
|
34
35
|
cp "$ENV_DIR"/*.mdc .cursor/rules/
|
|
35
36
|
|