mklive.sh: added support for xbps >= 0.16.6.
This commit is contained in:
parent
2446cf7dc5
commit
6f65afafa5
22
mklive.sh.in
22
mklive.sh.in
@ -240,8 +240,8 @@ if [ -n "$REPOSITORY_CACHE" ]; then
|
|||||||
fi
|
fi
|
||||||
XBPS_VERSION=$($XBPS_BIN_CMD -V|awk '{print $2}')
|
XBPS_VERSION=$($XBPS_BIN_CMD -V|awk '{print $2}')
|
||||||
case $XBPS_VERSION in
|
case $XBPS_VERSION in
|
||||||
# XBPS >= 0.16
|
# XBPS >= 0.16.6
|
||||||
[0-9].[1-9][6-9]*) XBPS_016=1;;
|
[0-9].[1-9][6-9].[6-9]*) XBPS_016_6=1;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
info_msg "Redirecting stdout/stderr to $LOGFILE ..."
|
info_msg "Redirecting stdout/stderr to $LOGFILE ..."
|
||||||
@ -329,24 +329,18 @@ pkgs=$($XBPS_BIN_CMD -r /tmp/blah -n install base-system grub-x86_64-efi)
|
|||||||
set -- ${pkgs}
|
set -- ${pkgs}
|
||||||
while [ $# -ne 0 ]; do
|
while [ $# -ne 0 ]; do
|
||||||
pkgn=$1; action=$2; ver=$3; repo=$4; binpkg=$5; arch=$6
|
pkgn=$1; action=$2; ver=$3; repo=$4; binpkg=$5; arch=$6
|
||||||
if [ -z "$XBPS_016" ]; then
|
shift 6
|
||||||
arch=$(basename $repo)
|
|
||||||
shift 5
|
|
||||||
else
|
|
||||||
shift 6
|
|
||||||
fi
|
|
||||||
mkdir -p $ROOTFS/packages/$arch
|
mkdir -p $ROOTFS/packages/$arch
|
||||||
bpkg=$repo/$arch/$binpkg
|
bpkg=$repo/$arch/$binpkg
|
||||||
cp -f $bpkg $ROOTFS/packages/$arch
|
cp -f $bpkg $ROOTFS/packages/$arch
|
||||||
|
ln -sfr $ROOTFS/packages/$arch/$binpkg $ROOTFS/packages/$binpkg
|
||||||
done
|
done
|
||||||
if [ -n "$XBPS_016" ]; then
|
if [ -n "$XBPS_016_6" ]; then
|
||||||
$XBPS_REPO_CMD genindex $ROOTFS/packages 2>&1 >>$LOGFILE
|
$XBPS_REPO_CMD index-add $ROOTFS/packages/*.xbps 2>&1 >>$LOGFILE
|
||||||
rm -f $ROOTFS/packages/index-files.plist
|
rm -f $ROOTFS/packages/index-files.plist
|
||||||
else
|
else
|
||||||
for f in $ROOTFS_REPODIR/*; do
|
${XBPS_REPO_CMD} genindex $ROOTFS/packages 2>&1 >>$LOGFILE
|
||||||
${XBPS_REPO_CMD} genindex $f 2>&1 >>$LOGFILE
|
rm -f $ROOTFS/packages/index-files.plist
|
||||||
rm -f $f/rindex-files.plist
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# install lsblk and blkid from util-linux. to avoid installing
|
# install lsblk and blkid from util-linux. to avoid installing
|
||||||
|
Loading…
x
Reference in New Issue
Block a user