Commit 06f45f3d authored by Ben Gamari's avatar Ben Gamari 🐢

patch-tool: Implement build-all

parent 76d06712
......@@ -109,6 +109,20 @@ update_patches() {
git -C $patches_dir status .
}
build_all() {
unpack_patch_all
for p in packages/*; do
split_pkg_version $(basename $p .patch)
echo
echo "=============================================================================="
echo "Building $package..."
echo "=============================================================================="
cabal v2-build \
--allow-newer=base,ghc,template-haskell,ghc-prim,containers \
$package
done
}
mkdir -p packages
usage() {
......@@ -121,6 +135,7 @@ Modes:
unpack-patch \$pkg unpack and apply patches to the given package
update-patches update patches for all unpacked packages
drop-old drop patches for obsolete package versions
build-all build all patches with cabal v2-build
EOF
}
......@@ -147,6 +162,10 @@ case "X$1" in
drop_old
;;
Xbuild-all)
build_all
;;
*)
echo "unknown mode $1"
usage
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment