|
|
@@ -14,8 +14,7 @@ fetch_repo() {
|
|
|
update_crate="$4"
|
|
|
|
|
|
if [ -d "$dir_name" ]; then
|
|
|
- ( cd "$dir_name" && git fetch origin --tags && \
|
|
|
- git checkout "$commit_id" )
|
|
|
+ echo "$dir_name already present"
|
|
|
else
|
|
|
git clone "$repo_url" "$dir_name" && \
|
|
|
( cd "$dir_name" && git checkout "$commit_id" && \
|
|
|
@@ -23,11 +22,11 @@ fetch_repo() {
|
|
|
# of our own sigma-rs dependencies
|
|
|
if [ -e "../patches/${dir_name}.diff" ]; then
|
|
|
patch -p1 < ../patches/${dir_name}.diff || exit 1
|
|
|
- fi )
|
|
|
- fi
|
|
|
- # Update the Cargo.lock file to catch the now-local sigma-rs dependencies
|
|
|
- if [ "$update_crate" != "" ]; then
|
|
|
- ( cd "$dir_name" && cargo update "$update_crate" ) || exit 1
|
|
|
+ fi ) || exit 1
|
|
|
+ # Update the Cargo.lock file to catch the now-local sigma-rs dependencies
|
|
|
+ if [ "$update_crate" != "" ]; then
|
|
|
+ ( cd "$dir_name" && cargo update "$update_crate" ) || exit 1
|
|
|
+ fi
|
|
|
fi
|
|
|
}
|
|
|
|