diskimage-builder/elements/opensuse-minimal/environment.d/10-opensuse-distro-name.bash
Markos Chandras 90536dbab3 Add opensuse-minimal element
Add a new opensuse-minimal element to build small and highly
configurable openSUSE based images using the zypper-minimal element
as the main building mechanism

Change-Id: Iebfc4ad4aff763e511b093f1607b55851ccbddcb
2016-10-05 09:39:29 +01:00

21 lines
918 B
Bash

export DISTRO_NAME=opensuse
export DIB_RELEASE=${DIB_RELEASE:-42.1}
export DIB_OPENSUSE_MIRROR=${DIB_OPENSUSE_MIRROR:-http://download.opensuse.org}
case ${DIB_RELEASE} in
# We are using "=>" as the assignment symbol since "@" "=" etc could be used in the URI itself.
# Remember, we can't export an array in bash so we use a string instead.
# Repo format: {name}=>{uri}
# Old openSUSE releases
13*)
ZYPPER_REPOS="update=>${DIB_OPENSUSE_MIRROR}/update/${DIB_RELEASE}/ "
ZYPPER_REPOS+="oss=>${DIB_OPENSUSE_MIRROR}/distribution/${DIB_RELEASE}/repo/oss/"
;;
# New Leap releases
42*)
ZYPPER_REPOS="update=>${DIB_OPENSUSE_MIRROR}/update/leap/${DIB_RELEASE}/oss/ "
ZYPPER_REPOS+="oss=>${DIB_OPENSUSE_MIRROR}/distribution/leap/${DIB_RELEASE}/repo/oss/"
;;
*) echo "Unsupported openSUSE release: ${DIB_RELEASE}"; exit 1 ;;
esac
export ZYPPER_REPOS