wok rev 9232

Try to fix get-linux-source
author Antoine Bodin <gokhlayeh@slitaz.org>
date Sat Mar 12 04:18:35 2011 +0100 (2011-03-12)
parents fe4b6c827b08
children 886e00452a15
files linux-source/stuff/get-linux-source
line diff
     1.1 --- a/linux-source/stuff/get-linux-source	Sat Mar 12 01:45:11 2011 +0100
     1.2 +++ b/linux-source/stuff/get-linux-source	Sat Mar 12 04:18:35 2011 +0100
     1.3 @@ -1,6 +1,8 @@
     1.4  #!/bin/sh
     1.5  
     1.6 -source /etc/tazwok.conf
     1.7 +
     1.8 +source /etc/slitaz/slitaz.conf
     1.9 +SOURCES_REPOSITORY=$SLITAZ_DIR/$SLITAZ_VERSION/src
    1.10  VERSION=XXX
    1.11  
    1.12  url=$(cat /usr/src/kernel-patches/slitaz/url)
    1.13 @@ -9,12 +11,13 @@
    1.14  	mkdir -p $SOURCES_REPOSITORY
    1.15  fi
    1.16  
    1.17 -if [ -f $SOURCES_REPOSITORY/$(basename $url) ]; then
    1.18 -	cd /usr/src/
    1.19 +cd /usr/src/
    1.20 +if [ -f $SOURCE_REPOSITORY/$(basename ${url//bz2/lzma}) ]; then
    1.21 +	unlzma -c $SOURCES_REPOSITORY/$(basename ${url//bz2/lzma}) | tar xf - -C $PWD
    1.22 +elif [ -f $SOURCES_REPOSITORY/$(basename $url) ]; then
    1.23  	tar xjf $SOURCES_REPOSITORY/$(basename $url)
    1.24  else
    1.25  	wget -O $SOURCES_REPOSITORY/$(basename $url) -c $url
    1.26 -	cd /usr/src/
    1.27  	tar xjf $SOURCES_REPOSITORY/$(basename $url)
    1.28  fi
    1.29  
    1.30 @@ -57,4 +60,4 @@
    1.31  
    1.32  See /usr/src/linux-$VERSION/README
    1.33  ----
    1.34 -EOT
    1.35 \ No newline at end of file
    1.36 +EOT