Re: [ptxdist] [patch 2/3] Add support for packages in zip-format to ptxdist

2008-08-07 Thread Robert Schwebel
On Tue, Aug 05, 2008 at 11:07:42PM +0200, Remy Bohmer wrote:
> Ptxdist only recognises tar.gz, tar.bz2 types of archives.
> But, some packages are distributed as zip-files (like at91bootstrap).
> 
> This patch adds support for zip-archives to ptxdist.
> 
> Signed-off-by: Remy Bohmer <[EMAIL PROTECTED]>

Applied, thanks!

rsc
-- 
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
 Hannoversche Str. 2, 31134 Hildesheim, Germany
   Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9


--
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [patch 2/3] Add support for packages in zip-format to ptxdist

2008-08-05 Thread Remy Bohmer
Ptxdist only recognises tar.gz, tar.bz2 types of archives.
But, some packages are distributed as zip-files (like at91bootstrap).

This patch adds support for zip-archives to ptxdist.

Signed-off-by: Remy Bohmer <[EMAIL PROTECTED]>
---
 rules/pre/Rules.make |   19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)
Index: ptxdist-trunk/rules/pre/Rules.make
===
--- ptxdist-trunk.orig/rules/pre/Rules.make 2008-08-05 22:43:29.0 
+0200
+++ ptxdist-trunk/rules/pre/Rules.make  2008-08-05 22:52:15.0 +0200
@@ -420,10 +420,22 @@ extract = 
\
echo "extract: dest=$$DEST";\
case "$$PACKET" in  \
*gz)\
-   EXTRACT=gzip\
+   echo $$(basename $$PACKET) >>   \
+   $(STATEDIR)/packetlist; \
+   gzip -dc $$PACKET | tar -C $$DEST -xf -;\
+   $(CHECK_PIPE_STATUS)\
;;  \
*bz2)   \
-   EXTRACT=bzip2   \
+   echo $$(basename $$PACKET) >>   \
+   $(STATEDIR)/packetlist; \
+   bzip2 -dc $$PACKET | tar -C $$DEST -xf -;   \
+   $(CHECK_PIPE_STATUS)\
+   ;;  \
+   *zip)   \
+   echo $$(basename $$PACKET) >>   \
+   $(STATEDIR)/packetlist; \
+   unzip -q $$PACKET -d $$DEST;\
+   $(CHECK_PIPE_STATUS)\
;;  \
*)  \
echo;   \
@@ -432,9 +444,6 @@ extract =   
\
exit 1; \
;;  \
esac;   \
-   echo $$(basename $$PACKET) >> $(STATEDIR)/packetlist;   \
-   $$EXTRACT -dc $$PACKET | tar -C $$DEST -xf -;   \
-   $(CHECK_PIPE_STATUS)
 
 #
 # get

-- 


--
ptxdist mailing list
ptxdist@pengutronix.de