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