Commit 47ff5d57 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Ben Gamari

patch-tool: Fixes

parent bda5a441
......@@ -70,7 +70,7 @@ unpack_patch_pkg() {
unpack_patch_all() {
for p in $patches_dir/*.patch; do
unpack_patch_pkg $p
unpack_patch_pkg $p || true
done
}
......@@ -95,9 +95,12 @@ unpack_pkg() {
update_patches() {
for p in packages/*; do
local patch_path=$patches_dir/$(basename $p).patch
git -C $p diff upstream > $patch_path
git -C $patches_dir add $patch_path
local patch_path=$patches_dir/$(basename $p)
git -C $p diff --ignore-cr-at-eol upstream > $patch_path.patch
git -C $patches_dir add $patch_path.patch
if [ -f $patch_path.cabal ]; then
git -C $patches_dir rm $patch_path.cabal
fi
done
git -C $patches_dir status .
}
......@@ -109,7 +112,7 @@ usage() {
usage: $0 MODE ...
Modes:
unpack-all unpack and patch all packages with patches
unpack-patch-all unpack and patch all packages with patches
unpack \$pkg unpack the given package into packages/
unpack-patch \$pkg unpack and apply patches to the given package
update-patches update patches for all unpacked packages
......@@ -122,7 +125,7 @@ case "X$1" in
unpack_pkg $2
;;
Xunpack-all)
Xunpack-patch-all)
unpack_patch_all
;;
......
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