forked from coinbase/agentkit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsync_framework_extensions.sh
More file actions
executable file
·41 lines (31 loc) · 1.3 KB
/
Copy pathsync_framework_extensions.sh
File metadata and controls
executable file
·41 lines (31 loc) · 1.3 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
#!/bin/bash
# Store the script's directory path
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Calculate the examples directory path (one level up and into examples)
FRAMEWORK_EXTENSIONS_DIR="$SCRIPT_DIR/../framework-extensions"
# Store the current directory to return to it later
CURRENT_DIR=$(pwd)
# Check if framework extensions directory exists
if [ ! -d "$FRAMEWORK_EXTENSIONS_DIR" ]; then
echo "Error: Framework extensions directory not found at $FRAMEWORK_EXTENSIONS_DIR"
exit 1
fi
echo "Syncing all framework extensions in $FRAMEWORK_EXTENSIONS_DIR..."
# Find all directories in the framework extensions folder
for framework_extension_dir in "$FRAMEWORK_EXTENSIONS_DIR"/*/ ; do
if [ -d "$framework_extension_dir" ]; then
echo "Processing framework extension: $(basename "$framework_extension_dir")"
cd "$framework_extension_dir"
# Run uv sync
if ! uv sync; then
echo "Warning: uv sync failed for $(basename "$framework_extension_dir")"
fi
# Run uv run ruff format .
if ! uv run ruff format .; then
echo "Warning: ruff format failed for $(basename "$framework_extension_dir")"
fi
fi
done
# Return to original directory
cd "$CURRENT_DIR"
echo "Finished syncing all framework extensions"