summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Walle <bernhard@bwalle.de>2013-04-29 13:27:09 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2013-05-03 19:01:05 +0200
commite609e8daa70f5a169435ed04ccb3126b054c1e3f (patch)
tree37d3c17a98ac0c7f002eef30d127e585278e80ca
parentbd0fb8e7429d96c3d54845ca21f8bbc4b03da9ed (diff)
downloadptxdist-e609e8daa70f5a169435ed04ccb3126b054c1e3f.tar.gz
ptxdist-e609e8daa70f5a169435ed04ccb3126b054c1e3f.tar.xz
Add support for xz'd patches
Since kernel.org provides their patches as .xz-compressed files, that's quite useful. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--scripts/lib/ptxd_make_world_patchin.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_world_patchin.sh b/scripts/lib/ptxd_make_world_patchin.sh
index 8f9bd420f..d9d1494e7 100644
--- a/scripts/lib/ptxd_make_world_patchin.sh
+++ b/scripts/lib/ptxd_make_world_patchin.sh
@@ -76,7 +76,7 @@ export -f ptxd_make_world_patchin_apply_git_init
# create a directory containing the patches and the selected series
# file. name that file "series".
#
-# decompress "bz2" and "gz" patches on the fly
+# decompress "bz2", "gz" and "xz" patches on the fly
#
ptxd_make_world_patchin_apply_git_compat()
{
@@ -106,6 +106,7 @@ ptxd_make_world_patchin_apply_git_compat()
""|"#"*) continue ;; # skip empty lines and comments
*.gz) cat="zcat" ;;
*.bz2) cat="bzcat" ;;
+ *.xz) cat="xzcat" ;;
*)
ln -s "../patches/${patch}" "${pkg_patchin_dir}/.ptxdist/git-patches/${patch_file}" &&
echo "${patch_file}" "${para}" >> "${pkg_patchin_dir}/.ptxdist/git-patches/series" || return
@@ -180,6 +181,7 @@ ptxd_make_world_patchin_apply_patch()
""|"#"*) continue ;; # skip empty lines and comments
*.gz) cat=zcat ;;
*.bz2) cat=bzcat ;;
+ *.xz) cat=xzcat ;;
*) cat=cat ;;
esac
@@ -259,6 +261,7 @@ ptxd_make_world_patchin_apply()
find \
-name "*.diff" -o \
-name "*.patch" -o \
+ -name "*.xz" -o \
-name "*.bz2" -o \
-name "*.gz" | \
sed -e "s:^[.]/::" | sort > \