]> git.karo-electronics.de Git - karo-tx-uboot.git/blob - lib_generic/lzma/import_lzmasdk.sh
Merge branch 'fixes' into cleanups
[karo-tx-uboot.git] / lib_generic / lzma / import_lzmasdk.sh
1 #!/bin/sh
2
3 usage() {
4         echo "Usage: $0 lzmaVERSION.tar.bz2" >&2
5         echo >&2
6         exit 1
7 }
8
9 if [ "$1" = "" ] ; then
10          usage
11 fi
12
13 if [ ! -f $1 ] ; then
14         echo "$1 doesn't exist!" >&2
15         exit 1
16 fi
17
18 BASENAME=`basename $1 .tar.bz2`
19 TMPDIR=/tmp/tmp_lib_$BASENAME
20 FILES="C/Compress/Lzma/LzmaDecode.h
21       C/Compress/Lzma/LzmaTypes.h
22       C/Compress/Lzma/LzmaDecode.c
23       history.txt
24       LGPL.txt
25       lzma.txt"
26
27
28 mkdir -p $TMPDIR
29 echo "Untar $1 -> $TMPDIR"
30 tar -jxf $1 -C $TMPDIR
31
32 for i in $FILES; do
33         echo Copying  $TMPDIR/$i \-\> `basename $i`
34         cp $TMPDIR/$i .
35         chmod -x `basename $i`
36 done
37
38 echo "done!"