#!/bin/bash #TODO switch to regex - - - #there is more than one package matching gcc-*: #/var/log/packages/gcc-9.3.0-x86_64-2 #/var/log/packages/gcc-g++-9.3.0-x86_64-2 #/var/log/packages/gcc-go-9.3.0-x86_64-2 function checkpkg { tmp=`ls -1 /var/log/packages/$1-*` if [[ -z $tmp ]]; then echo we need slackpkg installed exit 1 elif (( `echo "$tmp" | wc -l` > 1 )); then echo -e "there is more than one package matching $1-*:\n$tmp" exit 1 fi } for pkg in \ slackpkg slackpkg+ \ bridge-utils vlan \ reiser4progs libaal \ bison \ flex \ gc \ gcc \ git \ glibc \ guile \ make \ openssl \ patch \ pixman \ pciutils \ python3 \ texinfo \ zlib \ lzo \ yajl \ ; do checkpkg $pkg done; unset pkg #lvm2 thin-provisioning-tools cat <