Skip to content

Commit

Permalink
Merge pull request #14076 from rmcdermo/master
Browse files Browse the repository at this point in the history
Build: handle possible corrupt state of library repo
  • Loading branch information
rmcdermo authored Jan 17, 2025
2 parents 6971f0c + 4896692 commit 4c0ebd3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Build/Scripts/HYPRE/build_hypre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ echo "Checking for hypre repository..."
if [ -d "$FIREMODELS/hypre" ]; then
echo "Hypre repository exists. Building hypre library."
cd $FIREMODELS/hypre
# Handle possible corrupted state of repository
if git branch | grep -q "* master"; then
echo "On master branch"
else
git checkout master
fi
git checkout .
git clean -dxf
if [[ "$(git tag -l $HYPRE_LIB_TAG)" == $HYPRE_LIB_TAG ]]; then
echo "Checking out $HYPRE_LIB_TAG"
git checkout $HYPRE_LIB_TAG
Expand Down
8 changes: 8 additions & 0 deletions Build/Scripts/SUNDIALS/build_sundials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ echo "Checking for sundials repository..."
if [ -d "$FIREMODELS/sundials" ]; then
echo "Sundials repository exists. Building sundials library."
cd $FIREMODELS/sundials
# Handle possible corrupted state of repository
if git branch | grep -q "* main"; then
echo "On main branch"
else
git checkout main
fi
git checkout .
git clean -dxf
if [[ "$(git tag -l $SUNDIALS_LIB_TAG)" == $SUNDIALS_LIB_TAG ]]; then
echo "Checking out $SUNDIALS_LIB_TAG"
git checkout $SUNDIALS_LIB_TAG
Expand Down

0 comments on commit 4c0ebd3

Please sign in to comment.