patchinstall.sh: Rename 'git' backend to 'git-am', add 'git-apply' backend.

This commit is contained in:
Sebastian Lackner 2015-01-08 14:59:00 +01:00
parent 4f4df208a9
commit e01a0f00de
3 changed files with 41 additions and 17 deletions

View File

@ -30,15 +30,16 @@ usage()
echo "using a Makefile."
echo ""
echo "Configuration:"
echo " DESTDIR=path Specify the path to the wine source tree"
echo " --all Select all patches"
echo " --help Display this help and exit"
echo " --no-autoupdate Do not apply patchlist and don't auto-update files"
echo " -W patchset Exclude a specific patchset"
echo " DESTDIR=path Specify the path to the wine source tree"
echo " --all Select all patches"
echo " --help Display this help and exit"
echo " --no-autoupdate Do not apply patchlist and don't auto-update files"
echo " -W patchset Exclude a specific patchset"
echo ""
echo "Backends:"
echo " --backend=patch Use regular 'patch' utility to apply patches (default)"
echo " --backend=git Use 'git am' to apply patches"
echo " --backend=patch Use regular 'patch' utility to apply patches (default)"
echo " --backend=git-am Use 'git am' to apply patches"
echo " --backend=git-apply Use 'git apply' to apply patches"
echo ""
}}
@ -126,7 +127,7 @@ if [ "$backend" == "patch" ]; then
}}
# GIT backend - apply patches using 'git am'
elif [ "$backend" == "git" ]; then
elif [ "$backend" == "git" -o "$backend" == "git-am" ]; then
patch_apply ()
{{
@ -136,6 +137,17 @@ elif [ "$backend" == "git" ]; then
fi
}}
# Git apply backend
elif [ "$backend" == "git-apply" ]; then
patch_apply ()
{{
echo "Applying $1"
if ! cat "$1" | (cd "$DESTDIR" && git apply); then
abort "Failed to apply patch, aborting!"
fi
}}
# Stacked GIT backend - import the patches (mainly for developers)
elif [ "$backend" == "stg" ]; then

View File

@ -13,7 +13,7 @@ install:
.PHONY: install-git
install-git:
@echo "WARNING: Using this Makefile is deprecated!" >&2
"$(CURDIR)/patchinstall.sh" DESTDIR="$(DESTDIR)" --all --backend=git
"$(CURDIR)/patchinstall.sh" DESTDIR="$(DESTDIR)" --all --backend=git-am
.PHONY: series
series:

View File

@ -30,15 +30,16 @@ usage()
echo "using a Makefile."
echo ""
echo "Configuration:"
echo " DESTDIR=path Specify the path to the wine source tree"
echo " --all Select all patches"
echo " --help Display this help and exit"
echo " --no-autoupdate Do not apply patchlist and don't auto-update files"
echo " -W patchset Exclude a specific patchset"
echo " DESTDIR=path Specify the path to the wine source tree"
echo " --all Select all patches"
echo " --help Display this help and exit"
echo " --no-autoupdate Do not apply patchlist and don't auto-update files"
echo " -W patchset Exclude a specific patchset"
echo ""
echo "Backends:"
echo " --backend=patch Use regular 'patch' utility to apply patches (default)"
echo " --backend=git Use 'git am' to apply patches"
echo " --backend=patch Use regular 'patch' utility to apply patches (default)"
echo " --backend=git-am Use 'git am' to apply patches"
echo " --backend=git-apply Use 'git apply' to apply patches"
echo ""
}
@ -668,7 +669,7 @@ if [ "$backend" == "patch" ]; then
}
# GIT backend - apply patches using 'git am'
elif [ "$backend" == "git" ]; then
elif [ "$backend" == "git" -o "$backend" == "git-am" ]; then
patch_apply ()
{
@ -678,6 +679,17 @@ elif [ "$backend" == "git" ]; then
fi
}
# Git apply backend
elif [ "$backend" == "git-apply" ]; then
patch_apply ()
{
echo "Applying $1"
if ! cat "$1" | (cd "$DESTDIR" && git apply); then
abort "Failed to apply patch, aborting!"
fi
}
# Stacked GIT backend - import the patches (mainly for developers)
elif [ "$backend" == "stg" ]; then