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.
58 lines
1.7 KiB
58 lines
1.7 KiB
#!@BASH@ |
|
# |
|
# Copyright (C) 2020-2021 Alexandros Theodotou <alex at zrythm dot org> |
|
# |
|
# This file is part of Zrythm |
|
# |
|
# Zrythm is free software: you can redistribute it and/or modify |
|
# it under the terms of the GNU Affero General Public License as published by |
|
# the Free Software Foundation, either version 3 of the License, or |
|
# (at your option) any later version. |
|
# |
|
# Zrythm is distributed in the hope that it will be useful, |
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
# GNU Affero General Public License for more details. |
|
# |
|
# You should have received a copy of the GNU Affero General Public License |
|
# along with Zrythm. If not, see <https://www.gnu.org/licenses/>. |
|
|
|
set -ex |
|
|
|
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 |
|
cat $formula_file |
|
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-from-source $formula_name || true |
|
#echo "bottling $formula_name..." |
|
#brew bottle $formula_name |
|
#echo "bottled" |
|
ls -l |
|
popd |
|
#cp $private_dir/*.catalina.bottle.tar.gz $out_file |
|
touch $out_file
|
|
|