Avoid a non-portable use of tar reported by Roman Leshchinskiy
[ghc-hetmet.git] / boot-pkgs
index 91da9a3..e455426 100644 (file)
--- a/boot-pkgs
+++ b/boot-pkgs
@@ -22,7 +22,7 @@ do
             mkdir "libraries/$p"
             (
                 cd "libraries/$p"
-                tar -zxf ../../$tarball
+                cat ../../$tarball | gzip -d | tar xf -
                 mv */* .
             )
             touch "$stamp"
@@ -53,7 +53,7 @@ for f in $libraries; do
        else
            stage=1
        fi
-       top=`echo $f | sed 's#[^/]\+#..#g'`
+       top=`echo $f | sed 's#[^/][^/]*#..#g'`
        echo "${f}_PACKAGE = ${pkg}" >> $f/ghc.mk
        echo "${f}_dist-install_GROUP = libraries" >> $f/ghc.mk
        echo "\$(eval \$(call build-package,${f},dist-install,${stage}))" >> $f/ghc.mk