blob: 1e0f6863aab778bbc1cfe2f4ce9fa3a0963ae96d [file] [log] [blame]
Luigi 'Comio' Mantellinifc9c1722008-09-08 02:46:13 +02001#!/bin/sh
2
3usage() {
4 echo "Usage: $0 lzmaVERSION.tar.bz2" >&2
5 echo >&2
6 exit 1
7}
8
9if [ "$1" = "" ] ; then
10 usage
11fi
12
13if [ ! -f $1 ] ; then
14 echo "$1 doesn't exist!" >&2
15 exit 1
16fi
17
18BASENAME=`basename $1 .tar.bz2`
19TMPDIR=/tmp/tmp_lib_$BASENAME
Luigi 'Comio' Mantellinicaf72ff2009-07-21 10:45:49 +020020FILES="C/LzmaDec.h
21 C/Types.h
22 C/LzmaDec.c
Luigi 'Comio' Mantellinifc9c1722008-09-08 02:46:13 +020023 history.txt
Luigi 'Comio' Mantellinifc9c1722008-09-08 02:46:13 +020024 lzma.txt"
25
Luigi 'Comio' Mantellinifc9c1722008-09-08 02:46:13 +020026mkdir -p $TMPDIR
27echo "Untar $1 -> $TMPDIR"
28tar -jxf $1 -C $TMPDIR
29
30for i in $FILES; do
31 echo Copying $TMPDIR/$i \-\> `basename $i`
32 cp $TMPDIR/$i .
33 chmod -x `basename $i`
34done
35
36echo "done!"