Luigi 'Comio' Mantellini | fc9c172 | 2008-09-08 02:46:13 +0200 | [diff] [blame] | 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 |
Luigi 'Comio' Mantellini | caf72ff | 2009-07-21 10:45:49 +0200 | [diff] [blame] | 20 | FILES="C/LzmaDec.h |
| 21 | C/Types.h |
| 22 | C/LzmaDec.c |
Luigi 'Comio' Mantellini | fc9c172 | 2008-09-08 02:46:13 +0200 | [diff] [blame] | 23 | history.txt |
Luigi 'Comio' Mantellini | fc9c172 | 2008-09-08 02:46:13 +0200 | [diff] [blame] | 24 | lzma.txt" |
| 25 | |
Luigi 'Comio' Mantellini | fc9c172 | 2008-09-08 02:46:13 +0200 | [diff] [blame] | 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!" |