diff options
author | Juan RP <xtraeme@gmail.com> | 2012-07-18 09:46:32 +0200 |
---|---|---|
committer | Juan RP <xtraeme@gmail.com> | 2012-07-18 09:46:32 +0200 |
commit | 6f65afafa5fab4c60984cd1b5205c3debee41d1c (patch) | |
tree | d52ed2d29d1a4191655c3a39328ef22866df2acd /mklive.sh.in | |
parent | 2446cf7dc56d269d972164ae4a758f7ac27e79e5 (diff) | |
download | hrmpf-6f65afafa5fab4c60984cd1b5205c3debee41d1c.tar.gz hrmpf-6f65afafa5fab4c60984cd1b5205c3debee41d1c.tar.xz hrmpf-6f65afafa5fab4c60984cd1b5205c3debee41d1c.zip |
mklive.sh: added support for xbps >= 0.16.6.
Diffstat (limited to 'mklive.sh.in')
-rw-r--r-- | mklive.sh.in | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/mklive.sh.in b/mklive.sh.in index b51906f..e145fd4 100644 --- a/mklive.sh.in +++ b/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 + shift 6 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 |