This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi all, I'm new in this list. Last week I played with crosstool-0.17. Nice tool!. Well, I modified 'getandpatch.sh' patch to work also with bz2 archives because of this format is being used frequently. Attached you'll find the patch against croosstool-0.17/getandpatch.sh Guillermo. -- Guillermo Ballester Valor registered linux user #117181 gbv@oxixares.com Ogijares, Granada SPAIN
--- crosstool-0.17/getandpatch.sh 2003-07-31 15:41:57.000000000 +0200 +++ crosstool-new/getandpatch.sh 2003-08-08 19:47:28.000000000 +0200 @@ -29,19 +29,26 @@ # Assumes that the tarball unpacks to a name guessable from its url, # and that patches already exist locally in a directory named after the tarball. getUnpackAndPatch() { - BASENAME=`echo $1 | sed 's,.*/,,;s,\.tar\.gz$,,;'` + ARCHIVE_NAME=`echo $1 | sed 's,.*/,,;'` + BASENAME=`echo $ARCHIVE_NAME | sed 's,\.tar\.gz$,,;s,\.tar\.bz2$,,;'` + ZIP_METHOD=`echo $ARCHIVE_NAME | sed 's,.*\.tar\.,,;'` cd $TARBALLS_DIR # Download if not present - # FIXME: supposedly red hat 9's wget can't fetch from gnu.org. passive needed? - test -f $BASENAME.tar.gz || wget -c $1 + # + test -f $ARCHIVE_NAME || wget -c $1 cd $BUILD_DIR # unpack unconditionally rm -rf $BASENAME - tar -xzvf $TARBALLS_DIR/$BASENAME.tar.gz + if test $ZIP_METHOD = "gz" ; then + tar -xzvf $TARBALLS_DIR/$ARCHIVE_NAME; + elif test $ZIP_METHOD = "bz2"; then + tar -xjvf $TARBALLS_DIR/$ARCHIVE_NAME; + else abort "Bad compress format $ZIP_METHOD for tarball" + fi # Fix path of old linux source trees if [ -d linux ]; then @@ -63,15 +70,23 @@ # Special version for glibc addons getGlibcAddon() { - BASENAME=`echo $1 | sed 's,.*/,,;s,\.tar\.gz$,,;'` + ARCHIVE_NAME=`echo $1 | sed 's,.*/,,;'` + BASENAME=`echo $ARCHIVE_NAME | sed 's,\.tar\.gz$,,;s,\.tar\.bz2$,,;'` + ZIP_METHOD=`echo $ARCHIVE_NAME | sed 's,.*\.tar\.,,;'` + cd $TARBALLS_DIR # Download if not present - test -f $BASENAME.tar.gz || wget -c $1 + test -f $ARCHIVE_NAME || wget -c $1 cd $BUILD_DIR/$GLIBC_DIR - tar -xzvf $TARBALLS_DIR/$BASENAME.tar.gz + if test $ZIP_METHOD = "gz" ; then + tar -xzvf $TARBALLS_DIR/$ARCHIVE_NAME; + elif test $ZIP_METHOD = "bz2"; then + tar -xjvf $TARBALLS_DIR/$ARCHIVE_NAME; + else abort "Bad compress format $ZIP_METHOD for patch" + fi # Apply any patches for this component for p in $TOP_DIR/$BASENAME-patches/*.patch; do
------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |