You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!@BASH@
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
out_file="$1"
|
|
|
|
formula_file="$2"
|
|
|
|
private_dir="$3"
|
|
|
|
src_tarball="$4"
|
|
|
|
|
|
|
|
dash_trial="@DASH_TRIAL@"
|
|
|
|
formula_dir=/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
|
|
|
|
cache_dir="`brew --cache`"
|
|
|
|
|
|
|
|
rm -rf $private_dir
|
|
|
|
mkdir -p $private_dir
|
|
|
|
|
|
|
|
bottle_filename="`basename $out_file`"
|
|
|
|
formula_filename="`basename $formula_file`"
|
|
|
|
formula_name="${formula_filename%.*}"
|
|
|
|
|
|
|
|
# copy formula file to where it needs to be
|
|
|
|
cp $formula_file "$formula_dir/$formula_filename"
|
|
|
|
|
|
|
|
# copy the source tarball to the cache
|
|
|
|
formula_cache_file="`brew --cache -s $formula_name`"
|
|
|
|
cp $src_tarball $formula_cache_file
|
|
|
|
|
|
|
|
# build bottle
|
|
|
|
pushd $private_dir
|
|
|
|
echo "unlinking $formula_name..."
|
|
|
|
brew unlink $formula_name || true
|
|
|
|
echo "installing $formula_name..."
|
|
|
|
brew install --verbose --debug --build-bottle $formula_name || true
|
|
|
|
echo "bottling $formula_name..."
|
|
|
|
brew bottle $formula_name
|
|
|
|
ls -l
|
|
|
|
popd
|
|
|
|
cp $private_dir/*.catalina.bottle.tar.gz $out_file
|