aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/bash/function
diff options
context:
space:
mode:
authorjuraj.linkes <juraj.linkes@pantheon.tech>2019-07-17 14:28:30 +0200
committerPeter Mikus <pmikus@cisco.com>2019-07-23 08:39:28 +0000
commitc79c748013ec53ff59e9260034822a5b26afa441 (patch)
treea41c87a91079fe1f8d54938102ef3a0ef9ff97fd /resources/libraries/bash/function
parent6e1de92cec9a0687ca82bcefaae3ef7dad5104b0 (diff)
Add support for aarch64 container images
Change-Id: I84f13d7139a6e5f7004426018c2d27425c5fa97e Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
Diffstat (limited to 'resources/libraries/bash/function')
-rw-r--r--resources/libraries/bash/function/common.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh
index 696fc71189..e576f99d8d 100644
--- a/resources/libraries/bash/function/common.sh
+++ b/resources/libraries/bash/function/common.sh
@@ -648,7 +648,7 @@ function run_pybot () {
}
-function select_os () {
+function select_arch_os () {
# Populate variables related to local operating system.
#
@@ -678,7 +678,19 @@ function select_os () {
PKG_SUFFIX="rpm"
;;
*)
- die "Unable to identify distro or os from ${OS}"
+ die "Unable to identify distro or os from ${os_id}"
+ ;;
+ esac
+
+ arch=$(uname -m) || {
+ die "Get CPU architecture failed."
+ }
+
+ case "${arch}" in
+ "aarch64")
+ IMAGE_VER_FILE="${IMAGE_VER_FILE}_ARM"
+ ;;
+ *)
;;
esac
}