Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install bpf-sdk if none exists #58

Merged
merged 3 commits into from
Jun 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions do.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ perform_action() {
>>"${dump}-mangled.txt"
sed \
s/://g \
< "${dump}-mangled.txt" \
| rustfilt \
<"${dump}-mangled.txt" |
rustfilt \
> "${dump}.txt"
else
echo "Warning: No dump created, cannot find: $so"
Expand All @@ -127,21 +127,24 @@ perform_action() {
}

set -e

if [[ "$#" -ne 2 ]]; then
if [[ $1 == "update" ]]; then
perform_action "$1"
else
# Build all projects
if [[ ! -d "$sdkDir" ]]; then
./do.sh update
fi
fi

if [[ "$#" -ne 2 ]]; then
# Perform operation on all projects
for project in */; do
if [[ -f "$project"Cargo.toml ]]; then
perform_action "$1" "$PWD/$project" "$project"
else
continue;
continue
fi
done
fi
else
# Build requested project
# Perform operation on requested project
perform_action "$1" "$PWD/$2" "$2"
fi