Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit f571493

Browse files
authored
Make do.sh more generic (#37)
1 parent d4ad04b commit f571493

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

do.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ perform_action() {
5959
cargo fmt
6060
)
6161
;;
62+
doc)
63+
(
64+
cd "$2"
65+
echo "generating docs $2"
66+
cargo doc
67+
)
68+
;;
6269
update)
6370
mkdir -p $sdkParentDir
6471
./bpf-sdk-install.sh $sdkParentDir
@@ -123,10 +130,11 @@ if [[ "$#" -ne 2 ]]; then
123130
else
124131
# Build all projects
125132
for project in */; do
126-
if [[ ${project%/} == @($sdkParentDir|ci|target) ]]; then
133+
if [[ -f "$project"Cargo.toml ]]; then
134+
perform_action "$1" "$PWD/$project" "$project"
135+
else
127136
continue;
128137
fi
129-
perform_action "$1" "$PWD/$project" "$project"
130138
done
131139
fi
132140
else

0 commit comments

Comments
 (0)