mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
'cleaned up quickinst'
This commit is contained in:
parent
552b74a820
commit
4e0e843cbe
1 changed files with 4 additions and 29 deletions
|
@ -34,39 +34,14 @@ INSTMODE=$1
|
||||||
DESTDIR=$2
|
DESTDIR=$2
|
||||||
PKGARG=$3
|
PKGARG=$3
|
||||||
|
|
||||||
|
PACMAN="pacman --root ${DESTDIR} --config /tmp/pacman.conf --noconfirm --noprogressbar"
|
||||||
|
|
||||||
if [ "$PKGARG" = "" ]; then
|
if [ "$PKGARG" = "" ]; then
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
! [ -d /tmp ] && mkdir /tmp
|
! [ -d /tmp ] && mkdir /tmp
|
||||||
|
|
||||||
# sometimes this gets mounted RO, dunno why
|
|
||||||
/bin/mount -o remount,rw / >/dev/null 2>&1
|
|
||||||
|
|
||||||
PACMAN=
|
|
||||||
[ -f /tmp/usr/bin/pacman ] && PACMAN=/tmp/usr/bin/pacman
|
|
||||||
[ -f /usr/bin/pacman ] && PACMAN=/usr/bin/pacman
|
|
||||||
if [ "$PACMAN" = "" ]; then
|
|
||||||
cd /tmp
|
|
||||||
if [ "$INSTMODE" = "ftp" ]; then
|
|
||||||
echo "Downloading pacman..."
|
|
||||||
wget $PKGARG/pacman*.pkg.tar.gz
|
|
||||||
if [ $? -gt 0 ]; then
|
|
||||||
echo "error: Download failed"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
tar -xzf pacman*.pkg.tar.gz
|
|
||||||
elif [ "$INSTMODE" = "cd" ]; then
|
|
||||||
echo "Unpacking pacman..."
|
|
||||||
tar -xzf $PKGARG/pacman*.pkg.tar.gz
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
[ -f /tmp/usr/bin/pacman ] && PACMAN=/tmp/usr/bin/pacman
|
|
||||||
if [ "$PACMAN" = "" ]; then
|
|
||||||
echo "error: Cannot find the pacman binary!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$INSTMODE" = "ftp" ]; then
|
if [ "$INSTMODE" = "ftp" ]; then
|
||||||
echo "[core]" >/tmp/pacman.conf
|
echo "[core]" >/tmp/pacman.conf
|
||||||
echo "Server = $PKGARG" >>/tmp/pacman.conf
|
echo "Server = $PKGARG" >>/tmp/pacman.conf
|
||||||
|
@ -105,10 +80,10 @@ mount -t proc none $DESTDIR/proc
|
||||||
mount -t sysfs none $DESTDIR/sys
|
mount -t sysfs none $DESTDIR/sys
|
||||||
mount -o bind /dev $DESTDIR/dev
|
mount -o bind /dev $DESTDIR/dev
|
||||||
if [ "$INSTMODE" = "cd" ]; then
|
if [ "$INSTMODE" = "cd" ]; then
|
||||||
$PACMAN -r $DESTDIR --config /tmp/pacman.conf -Sy $PKGLIST
|
$PACMAN -Sy $PKGLIST
|
||||||
fi
|
fi
|
||||||
if [ "$INSTMODE" = "ftp" ]; then
|
if [ "$INSTMODE" = "ftp" ]; then
|
||||||
$PACMAN -r $DESTDIR --config /tmp/pacman.conf -Sy base
|
$PACMAN -Sy base
|
||||||
fi
|
fi
|
||||||
if [ $? -gt 0 ]; then
|
if [ $? -gt 0 ]; then
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Reference in a new issue