Skip to content

Commit 3ca5089

Browse files
committed
add helper bash function for installing all dependent modules of a single directory
1 parent cb0ecfc commit 3ca5089

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.kokoro/common.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,3 +347,15 @@ function install_modules() {
347347
-T 1C
348348
fi
349349
}
350+
351+
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
352+
root_dir=$(realpath "$scriptDir/..")
353+
function install_dependencies() {
354+
target_module_path=$(realpath "$1")
355+
rel_target_path=$(realpath --relative-to="$root_dir" "$target_module_path")
356+
echo "Resolving dependencies for $rel_target_path..."
357+
dependencies=$(python3 "$scriptDir/determine_dependencies.py" "$1")
358+
echo "Found dependencies: $dependencies"
359+
360+
install_modules "${dependencies}"
361+
}

0 commit comments

Comments
 (0)