bcf1fa6bb4
Moved configure (once again) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
68 lines
1008 B
Bash
Executable File
68 lines
1008 B
Bash
Executable File
#! /bin/sh
|
|
#
|
|
# Written by Martin Sperl
|
|
# (sperl@dsn.ast.univie.ac.at)
|
|
#
|
|
|
|
|
|
if test $# -lt 3 ; then
|
|
cat <<EOF
|
|
Usage: `basename $0` <basedir> <SOURCE-FILES> <DESTINATION-FILS>
|
|
copies all files from the source-tar-files to the common
|
|
destination-tar-file with basedir as a common base directory.
|
|
EOF
|
|
exit 0
|
|
fi
|
|
|
|
BaseDir="$1"
|
|
shift
|
|
|
|
Sourcefiles="$1"
|
|
|
|
while test "$#" != 2 ; do
|
|
shift
|
|
Sourcefiles="$Sourcefiles $1"
|
|
done
|
|
|
|
shift
|
|
Final=$1
|
|
|
|
Destination=/tmp/join$$.tar
|
|
|
|
touch $Destination
|
|
|
|
curdir=`pwd`
|
|
|
|
mkdir tmp$$
|
|
mkdir tmp$$/$BaseDir
|
|
|
|
#uncompress all files
|
|
cd tmp$$/$BaseDir
|
|
for each in $Sourcefiles ; do
|
|
( \
|
|
if test `basename $each gz` != `basename $each` ; then \
|
|
gzip -dc ../../$each;\
|
|
else \
|
|
cat ../../$each;\
|
|
fi; \
|
|
) | tar xf -
|
|
done
|
|
cd ..
|
|
#now tar everything
|
|
tar -cf $Destination *
|
|
|
|
cd ..
|
|
|
|
rm -fr tmp$$
|
|
|
|
# goto old directory
|
|
cd $curdir
|
|
|
|
if test `basename $Final gz` != `basename $Final` ; then
|
|
gzip -c $Destination > $Final
|
|
else
|
|
cat $Destination > $Final
|
|
fi
|
|
|
|
rm -f $Destination
|