use smallbunzip only when we can't start bunzip
This commit is contained in:
parent
7cfb7d912f
commit
b38a20904c
@ -32,7 +32,13 @@ then echo "Couldn't find package $f."
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat $f | smallbunzip2 | pax -r -p e
|
# can we execute bunzip2?
|
||||||
|
if bunzip2 --help 2>&1 | grep usage >/dev/null
|
||||||
|
then BUNZIP2=bunzip2
|
||||||
|
else BUNZIP2=smallbunzip2
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat $f | $BUNZIP2 | pax -r -p e
|
||||||
if [ -f $PI ]
|
if [ -f $PI ]
|
||||||
then
|
then
|
||||||
sh -e $PI
|
sh -e $PI
|
||||||
|
@ -15,6 +15,12 @@ URL2=http://www.minix3.org/beta_packages
|
|||||||
SRCURL1=http://www.minix3.org/software
|
SRCURL1=http://www.minix3.org/software
|
||||||
SRCURL2=http://www.minix3.org/beta_software
|
SRCURL2=http://www.minix3.org/beta_software
|
||||||
|
|
||||||
|
# can we execute bunzip2?
|
||||||
|
if bunzip2 --help 2>&1 | grep usage >/dev/null
|
||||||
|
then BUNZIP2=bunzip2
|
||||||
|
else BUNZIP2=smallbunzip2
|
||||||
|
fi
|
||||||
|
|
||||||
if id | fgrep "uid=0(" >/dev/null
|
if id | fgrep "uid=0(" >/dev/null
|
||||||
then :
|
then :
|
||||||
else echo "Please run $0 as root."
|
else echo "Please run $0 as root."
|
||||||
@ -89,7 +95,7 @@ else cont=y
|
|||||||
echo " * Installing sources in $SRC .."
|
echo " * Installing sources in $SRC .."
|
||||||
for f in $CDSRC/*.tar.bz2
|
for f in $CDSRC/*.tar.bz2
|
||||||
do echo "$f .."
|
do echo "$f .."
|
||||||
smallbunzip2 -dc $f | tar xf -
|
$BUNZIP2 -dc $f | tar xf -
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@ -199,7 +205,7 @@ do cd $TMPDIR
|
|||||||
echo "Retrieving source from $srcurl .."
|
echo "Retrieving source from $srcurl .."
|
||||||
urlget $srcurl >$srcfile || exit
|
urlget $srcurl >$srcfile || exit
|
||||||
echo "Source retrieved in $SRC/$srcfile."
|
echo "Source retrieved in $SRC/$srcfile."
|
||||||
smallbunzip2 -dc $srcfile | tar xf - >/dev/null || exit
|
$BUNZIP2 -dc $srcfile | tar xf - >/dev/null || exit
|
||||||
echo "Source unpacked in $SRC."
|
echo "Source unpacked in $SRC."
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
@ -217,7 +223,7 @@ do cd $TMPDIR
|
|||||||
read src
|
read src
|
||||||
if [ "$src" = y -o "$src" = Y ]
|
if [ "$src" = y -o "$src" = Y ]
|
||||||
then ( cd $SRC || exit
|
then ( cd $SRC || exit
|
||||||
smallbunzip2 -dc $srcfile | tar xf - || exit
|
$BUNZIP2 -dc $srcfile | tar xf - || exit
|
||||||
echo "Source $srcfile unpacked in $SRC."
|
echo "Source $srcfile unpacked in $SRC."
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user