diff options
author | Andrew Robbins <contact@andrewrobbins.info> | 2017-05-31 02:21:11 -0400 |
---|---|---|
committer | Andrew Robbins <contact@andrewrobbins.info> | 2017-05-31 06:24:24 -0400 |
commit | 1ea8d09af262ddeed87acf5916cec42d9a002da1 (patch) | |
tree | 195dc287813bdf9ee8240092a56f19bbad68dd1e /libs/git | |
parent | 10aa44585ed4dd1495f47229daa2db4831694c9c (diff) | |
download | librebootfr-1ea8d09af262ddeed87acf5916cec42d9a002da1.tar.gz librebootfr-1ea8d09af262ddeed87acf5916cec42d9a002da1.zip |
Patching now works. bucts can be patched & built.
Modified the function git_project_patch_recursive (in libs/git) to
enable patching with diff files, which uses the new function
diff_patch_file located in libs/common. A generic action script for
bucts is in projects/bucts/. Install/revision/target files are in
projects/bucts/configs/. bucts' merge into the new build system should
be nearly, if not already, complete.
Diffstat (limited to 'libs/git')
-rwxr-xr-x | libs/git | 36 |
1 files changed, 18 insertions, 18 deletions
@@ -226,29 +226,29 @@ git_project_check() { } git_project_patch_recursive() { - local project=$1 - local repository=$2 - local branch=$3 - local path=$4 + local project="$1" + local repository="$2" + local branch="$3" + local path="${4:-.}" - local repository_path=$( git_project_repository_path "$repository" ) - local project_path=$( project_path "$project" ) - local patches_path="$project_path/$PATCHES/$path/$WILDDOTPATCH" - local patch_path + local repository_path="$(git_project_repository_path "${repository}")" + local project_path="$(project_path "${project}")" + local patches_path="${project_path}/${PATCHES}/${path}" - if ! [ -z "$path" ] && [ "$path" != "." ] - then - git_project_patch_recursive "$project" "$repository" "$branch" "$( dirname "$path" )" + if ! [[ -d "${patches_path}" ]]; then + return fi - path_wildcard_expand "$patches_path" | while read patch_path - do - if ! [ -f "$patch_path" ] - then - continue - fi + if [[ "${path}" != "." ]]; then + git_project_patch_recursive "${project}" "${repository}" "${branch}" "$(dirname "${path}")" + fi - git_patch "$repository_path" "$branch" "$patch_path" + for patch in "${patches_path}"/[!.]*.{patch,diff}; do + if [[ "${patch##*.}" == "patch" ]]; then + git_patch "${repository_path}" "${branch}" "${patch}" + else + diff_patch_file "${repository_path}" "${patch}" + fi done } |