Skip to content

Commit

Permalink
Handle gmp/mpfr already in homebrew's cache
Browse files Browse the repository at this point in the history
Or we could rm -rf $(brew --cache)
  • Loading branch information
mglisse committed Oct 31, 2023
1 parent 1216f7d commit a4f1088
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/build_osx_universal_gmpfr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ set -e
# Assumes that the user has enough rights to run brew fetch

# Downloading
SED_PGM='s/^Downloaded to: |^Already downloaded: //p'
mkdir deps-amd64
cd deps-amd64
tar xf "`brew fetch --bottle-tag=x86_64_monterey gmp | sed -ne 's/^Downloaded to: //p'`"
tar xf "`brew fetch --bottle-tag=x86_64_monterey mpfr | sed -ne 's/^Downloaded to: //p'`"
tar xf "`brew fetch --bottle-tag=x86_64_monterey gmp | grep -F bottle.tar.gz | sed -Ene "$SED_PGM"`"
tar xf "`brew fetch --bottle-tag=x86_64_monterey mpfr | grep -F bottle.tar.gz | sed -Ene "$SED_PGM"`"
cd ..
mkdir deps-arm64
cd deps-arm64
tar xf "`brew fetch --bottle-tag=arm64_monterey gmp | sed -ne 's/^Downloaded to: //p'`"
tar xf "`brew fetch --bottle-tag=arm64_monterey mpfr | sed -ne 's/^Downloaded to: //p'`"
tar xf "`brew fetch --bottle-tag=arm64_monterey gmp | grep -F bottle.tar.gz | sed -Ene "$SED_PGM"`"
tar xf "`brew fetch --bottle-tag=arm64_monterey mpfr | grep -F bottle.tar.gz | sed -Ene "$SED_PGM"`"
cd ..

# Merging
Expand Down

0 comments on commit a4f1088

Please sign in to comment.