自动安装rpm依赖

#!/bin/sh
set -x
BASEDIR=$(dirname $0)
FILE=$BASEDIR/failed.txt
echo "$BASEDIR/$1"
rpmbuild -ba $BASEDIR/$1 2> $FILE
ERNR=$(awk '$1 == "error:"{print NR}' $FILE)
echo "$ERNR"
for rpm in $(awk 'NR > $ERNR{print $1}' $FILE)
do
        dnf install "$rpm"
done

上一篇:RvmTranslator7.3.2


下一篇:maven中配置Allatori