fixed for build with opensuse tumbleweed and leap - and fedora, centos, mageia

master
Marc Wäckerlin 6 years ago
parent 2f1339b6c5
commit 2e41294684
  1. 15
      build-in-docker.sh

@ -203,11 +203,16 @@ function ifthenelse() {
DISTRIBUTOR=$(docker exec ${DOCKER_ID} lsb_release -si | sed 's, .*,,;s,.*,\L&,g') DISTRIBUTOR=$(docker exec ${DOCKER_ID} lsb_release -si | sed 's, .*,,;s,.*,\L&,g')
CODENAME=$(docker exec ${DOCKER_ID} lsb_release -cs) CODENAME=$(docker exec ${DOCKER_ID} lsb_release -cs)
ARCH=$((docker exec ${DOCKER_ID} which dpkg > /dev/null 2> /dev/null && docker exec ${DOCKER_ID} dpkg --print-architecture) || echo amd64) ARCH=$((docker exec ${DOCKER_ID} which dpkg > /dev/null 2> /dev/null && docker exec ${DOCKER_ID} dpkg --print-architecture) || echo amd64)
if test "$CODENAME" = "n/a"; then case "$DISTRIBUTOR" in
if test "$DISTRIBUTOR" = "opensuse"; then (opensuse) # code name may be not available, then set leap or tumbleweed
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') if test "$CODENAME" = "n/a"; then
fi 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 fi
;;
(fedora|centos|mageia) # numeric code name
CODENAME=$(docker exec ${DOCKER_ID} lsb_release -rs)
;;
esac
if test "${arg/:::/}" = "${arg}"; then if test "${arg/:::/}" = "${arg}"; then
cmd_tmp="${cmd//ARG/${arg//@DISTRIBUTOR@/${DISTRIBUTOR}}}" cmd_tmp="${cmd//ARG/${arg//@DISTRIBUTOR@/${DISTRIBUTOR}}}"
docker exec ${DOCKER_ID} bash -c "${cmd_tmp//@CODENAME@/${CODENAME}}" docker exec ${DOCKER_ID} bash -c "${cmd_tmp//@CODENAME@/${CODENAME}}"

Loading…
Cancel
Save