check-install.sh (768B)
1#!/bin/sh 2# 3# check-install.sh 4 5export XBPS_TARGET_ARCH="$2" XBPS_DISTDIR=/hostrepo 6 7if [ "$1" != "$XBPS_TARGET_ARCH" ]; then 8 triplet="$(/hostrepo/xbps-src -a "$XBPS_TARGET_ARCH" show-var XBPS_CROSS_TRIPLET)" 9 ROOTDIR="-r /usr/$triplet" 10fi 11 12ADDREPO="--repository=$HOME/hostdir/binpkgs --repository=$HOME/hostdir/binpkgs/nonfree" 13 14while read -r pkg; do 15 for subpkg in $(xsubpkg $pkg); do 16 /bin/echo -e "\x1b[32mTrying to install dependants of $subpkg:\x1b[0m" 17 for dep in $(xbps-query $ADDREPO -RX "$subpkg"); do 18 xbps-install \ 19 $ROOTDIR $ADDREPO \ 20 -Sny \ 21 "$subpkg" "$(xbps-uhelper getpkgname "$dep")" 22 if [ $? -eq 8 ]; then 23 /bin/echo -e "\x1b[31mFailed to install '$subpkg' and '$dep'\x1b[0m" 24 exit 1 25 fi 26 done 27 done 28done < /tmp/templates