From 137fe19ea945347bbae039cbb8a590ea90e80228 Mon Sep 17 00:00:00 2001 From: Takuya ASADA Date: Thu, 8 Oct 2015 06:05:12 +0900 Subject: [PATCH] dist: support glob pattern on do_install() Currently do_install() does not function correctly when passing glob pattern & package are already installed. Signed-off-by: Takuya ASADA --- dist/redhat/centos_dep/build_dependency.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dist/redhat/centos_dep/build_dependency.sh b/dist/redhat/centos_dep/build_dependency.sh index 4edac061c3..8adb7140ff 100755 --- a/dist/redhat/centos_dep/build_dependency.sh +++ b/dist/redhat/centos_dep/build_dependency.sh @@ -4,10 +4,7 @@ export RPMBUILD=`pwd`/build/rpmbuild do_install() { pkg=$1 - name=${pkg/%.rpm/} - if ! rpm -qs $name >/dev/null 2>&1; then - sudo yum install -y $RPMBUILD/RPMS/x86_64/$pkg || sudo yum install -y $RPMBUILD/RPMS/noarch/$pkg - fi + sudo yum install -y $RPMBUILD/RPMS/*/$pkg 2> build/err || if [ "`cat build/err`" != "Error: Nothing to do" ]; then cat build/err; exit 1;fi echo Install $name done }