From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtprelay02.ispgateway.de ([80.67.18.44]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1UWmEh-00061U-St for ptxdist@pengutronix.de; Mon, 29 Apr 2013 13:27:18 +0200 Received: from [78.47.165.117] (helo=regiomontanus.your-server.de) by smtprelay02.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1UWmEg-00014u-Um for ptxdist@pengutronix.de; Mon, 29 Apr 2013 13:27:11 +0200 From: Bernhard Walle Date: Mon, 29 Apr 2013 13:27:09 +0200 Message-Id: <1367234829-4587-1-git-send-email-bernhard@bwalle.de> Subject: [ptxdist] [PATCH] Add support for xz'd patches Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Since kernel.org provides their patches as .xz-compressed files, that's quite useful. Signed-off-by: Bernhard Walle --- scripts/lib/ptxd_make_world_patchin.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/lib/ptxd_make_world_patchin.sh b/scripts/lib/ptxd_make_world_patchin.sh index 8f9bd42..d9d1494 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 > \ -- 1.8.2.2 -- ptxdist mailing list ptxdist@pengutronix.de