Skip to content

Commit

Permalink
ci: add subdir support
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs committed Feb 5, 2025
1 parent 7d6a212 commit d6e14f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ci/vendor-wit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ make_vendor() {
mkdir -p $path

for package in $packages; do
IFS='@' read -r repo tag <<< "$package"
mkdir -p $path/$package
IFS='@' read -r repo tag subdir <<< "$package"
mkdir -p "$path/$package"
cached_extracted_dir="$cache_dir/$repo-$tag"

if [[ ! -d $cached_extracted_dir ]]; then
mkdir -p $cached_extracted_dir
curl -sL https://github.com/WebAssembly/wasi-$repo/archive/$tag.tar.gz | \
tar xzf - --strip-components=1 -C $cached_extracted_dir
rm -rf $cached_extracted_dir/wit/deps*
rm -rf $cached_extracted_dir/${subdir:-"wit"}/deps*
fi

cp -r $cached_extracted_dir/wit/* $path/$package
cp -r $cached_extracted_dir/${subdir:-"wit"}/* $path/$package
done
}

Expand Down

0 comments on commit d6e14f6

Please sign in to comment.