Skip to content

Commit f56ae01

Browse files
committed
fix sync script
1 parent 31cc834 commit f56ae01

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

sw/bin/executable_sync_coderabbitai.sh

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,8 @@ pull_all.sh ~/Work/coderabbitai
55

66
# go through all the directories in ~/Work/coderabbitai
77
# look for package.json files in the subdirectories
8-
for dir in ~/Work/coderabbitai/*; do
9-
if [ -d "$dir" ]; then
10-
# find all package.json files in the subdirectories
11-
package_json_files=$(find "$dir" -name package.json)
12-
for package_json_file in $package_json_files; do
13-
# run pnpm install in the directory containing the package.json file
14-
pushd "$(dirname "$package_json_file")" >/dev/null || continue
15-
pnpm install
16-
popd >/dev/null || continue
17-
done
18-
fi
8+
# and run pnpm install in those directories
9+
find ~/Work/coderabbitai -name package.json -exec dirname {} \; | while read dir; do
10+
echo "Installing dependencies in $dir"
11+
(cd $dir && pnpm install)
1912
done

0 commit comments

Comments
 (0)