2013-11-07 04:25:34 +00:00
|
|
|
#!/bin/bash
|
2013-02-13 22:16:00 +00:00
|
|
|
|
2014-09-04 04:56:29 +00:00
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
2014-04-03 02:24:15 +00:00
|
|
|
set -eu
|
2014-03-29 03:28:22 +00:00
|
|
|
set -o pipefail
|
|
|
|
|
2013-02-13 22:16:00 +00:00
|
|
|
if [ "i386" = "$ARCH" ]; then
|
2014-05-02 17:02:38 +00:00
|
|
|
basearch=i386
|
|
|
|
arch=i686
|
2016-11-01 14:19:44 +00:00
|
|
|
elif [[ "amd64 x86_64" =~ "$ARCH" ]]; then
|
2014-05-02 17:02:38 +00:00
|
|
|
basearch=x86_64
|
|
|
|
arch=x86_64
|
2015-01-22 06:34:27 +00:00
|
|
|
elif [[ "$ARCH" = "ppc64" ]]; then
|
|
|
|
basearch=ppc64
|
|
|
|
arch=ppc64
|
|
|
|
elif [[ "$ARCH" = "ppc64el" ]]; then
|
|
|
|
basearch=ppc64el
|
|
|
|
arch=ppc64el
|
2017-01-18 20:49:20 +00:00
|
|
|
elif [[ "arm64 aarch64" =~ "$ARCH" ]]; then
|
2016-11-17 02:47:26 +00:00
|
|
|
basearch=aarch64
|
|
|
|
arch=aarch64
|
2013-02-13 22:16:00 +00:00
|
|
|
else
|
2014-05-02 17:02:38 +00:00
|
|
|
echo "********************"
|
|
|
|
echo "Unknown arch '$ARCH'"
|
|
|
|
echo "********************"
|
|
|
|
exit 1
|
2013-02-13 22:16:00 +00:00
|
|
|
fi
|
|
|
|
|
2015-07-23 19:26:53 +00:00
|
|
|
if [[ $DISTRO_NAME == "fedora" && $DIB_RELEASE -ge 22 ]]; then
|
2015-05-27 04:53:04 +00:00
|
|
|
mkdir -p /etc/dnf/vars
|
|
|
|
echo $basearch > /etc/dnf/vars/basearch
|
2016-11-17 08:36:54 +00:00
|
|
|
echo $arch > /etc/dnf/vars/arch
|
2015-05-27 04:53:04 +00:00
|
|
|
else
|
|
|
|
echo $basearch > /etc/yum/vars/basearch
|
|
|
|
echo $arch > /etc/yum/vars/arch
|
|
|
|
fi
|