]> git.sur5r.net Git - u-boot/blob - lib/lzma/import_lzmasdk.sh
Merge branch 'master' of git://www.denx.de/git/u-boot-cfi-flash
[u-boot] / lib / 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/LzmaDec.h
21       C/Types.h
22       C/LzmaDec.c
23       history.txt
24       lzma.txt"
25
26 mkdir -p $TMPDIR
27 echo "Untar $1 -> $TMPDIR"
28 tar -jxf $1 -C $TMPDIR
29
30 for i in $FILES; do
31         echo Copying  $TMPDIR/$i \-\> `basename $i`
32         cp $TMPDIR/$i .
33         chmod -x `basename $i`
34 done
35
36 echo "done!"