#!/bin/bash repo=/data/kernels/slackware142 slackmount=lala #set is not defined, using [a-z]+ instead installpkgname() { #egrep "^$repo/[a-z]+/$pkg-[[:alnum:]\._]+-[[:alnum:]_]+-[[:digit:]]+.txz$" pkgfix=`echo $pkg | sed 's/+/\\\+/g'` pkgfile=`find $repo/ -type f | egrep "^$repo/[a-z]+/$pkgfix-[^-]+-[^-]+-[^-]+.txz$"` [[ -z $pkgfile ]] && echo no txz archive found for $pkg && exit 1 (( `echo "$pkgfile" | wc -l` != 1 )) \ && printf "too much results for $pkg:\n$pkgfile\n" && exit 1 echo -n installpkg --root $slackmount $pkgfile... installpkg --root $slackmount $pkgfile >/dev/null && echo done unset pkgfix pkgfile } newpkgs=`egrep -Ev '^#|^[[:space:]]*$' /root/bin/slackware.more.lst | awk '{print $1}'` echo INSTALLING MORE PACKAGES for pkg in $newpkgs; do installpkgname done; unset pkg unset newpkgs echo '' cat <