diff --git a/build-in-docker.sh b/build-in-docker.sh index ab4ecaa..a53edc7 100755 --- a/build-in-docker.sh +++ b/build-in-docker.sh @@ -209,9 +209,12 @@ function ifthenelse() { CODENAME=$(docker exec ${DOCKER_ID} lsb_release -ds | sed "s,\($(docker exec ${DOCKER_ID} lsb_release -si | sed 's, ,\\|,g')\) *,,"';s, .*,,g;s,",,g;s,.*,\L&,g') fi ;; - (fedora|centos|mageia) # numeric code name + (fedora|mageia) # numeric code name CODENAME=$(docker exec ${DOCKER_ID} lsb_release -rs) ;; + (centos) # only look at major number in centos + CODENAME=$(docker exec ${DOCKER_ID} lsb_release -rs | sed 's,\..*,,') + ;; esac if test "${arg/:::/}" = "${arg}"; then cmd_tmp="${cmd//ARG/${arg//@DISTRIBUTOR@/${DISTRIBUTOR}}}" @@ -336,7 +339,7 @@ EOF docker exec -i ${DOCKER_ID} rm rpm-key done for repo in "${repos[@]}"; do - INSTALL_REPO=$((docker exec ${DOCKER_ID} test -x /usr/bin/zypper && echo zypper ar) || (docker exec ${DOCKER_ID} test -x /usr/bin/dnf && echo dnf config-manager --add-repo) || (docker exec ${DOCKER_ID} test -x /usr/bin/yum && echo wget -O/etc/yum.repos.d/additional$i.repo) || (docker exec ${DOCKER_ID} test -x /usr/sbin/urpmi && echo false)) + INSTALL_REPO=$((docker exec ${DOCKER_ID} test -x /usr/bin/zypper && echo zypper ar) || (docker exec ${DOCKER_ID} test -x /usr/bin/dnf && echo dnf config-manager --add-repo) || (docker exec ${DOCKER_ID} test -x /usr/bin/yum && echo yum-config-manager --add-repo) || (docker exec ${DOCKER_ID} test -x /usr/sbin/urpmi && echo false)) ifthenelse "${repo}" "${INSTALL_REPO} ARG" ((++i)) done