On 2012-10-06 13:30 , Manuel López-Ibáñez wrote:

+download_prerequisite() {
+    WHAT=$1
+    VERSION=$2
+    PACK=$3
+    case $PACK in
+        tar.bz2) TARX="j";;
+        tar.gz)  TARX="z";;
+    esac

GNU tar has not needed 'j' or 'z' for a while. Not sure whether other tars have the same feature, though.

The patch is OK with a minor change:

+    wget ftp://gcc.gnu.org/pub/gcc/infrastructure/$WHAT-${VERSION}.${PACK} || 
exit 1
+    tar x${TARX}f $WHAT-${VERSION}.${PACK} || exit 1
+    ln -sf $WHAT-${VERSION} $WHAT || exit 1
+    rm $WHAT-${VERSION}.${PACK} || exit 1
+}
+
+if [ ! -e ./contrib/download_prerequisites ]; then

Better use -x here.


Diego.

Reply via email to