From 6f73a728396505d4c89d04a041016bbe81b09b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Sat, 15 Jul 2023 09:39:31 +0200 Subject: [PATCH] ci: Move kata-arch.sh as it was MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's move `.ci/kata-arch.sh` file from the tests repo to this one. The file has been moved as it is, it's not used, and in the following commits we'll clean it up before actually using it. Signed-off-by: Fabiano FidĂȘncio --- tests/kata-arch.sh | 128 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100755 tests/kata-arch.sh diff --git a/tests/kata-arch.sh b/tests/kata-arch.sh new file mode 100755 index 000000000..b8d81b057 --- /dev/null +++ b/tests/kata-arch.sh @@ -0,0 +1,128 @@ +#!/usr/bin/env bash +# +# Copyright (c) 2018 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# + +set -e + +typeset -r script_name=${0##*/} + +typeset -r cidir=$(dirname "$0") +source "${cidir}/lib.sh" + +usage() +{ +cat <&2; exit 1; } + + while [ $# -gt 1 ] + do + case "$1" in + -d|--default) ;; + + -g|--golang) type="golang";; + + -r|--rust) type="rust";; + + -h|--help) + usage + exit 0 + ;; + + -k|--kernel) type="kernel";; + + --) + shift + break + ;; + esac + shift + done + + local -r arch=$(uname -m) + + case "$type" in + default) echo "$arch";; + golang) arch_to_golang "$arch";; + rust) arch_to_rust "${arch}";; + kernel) arch_to_kernel "$arch";; + esac +} + +main "$@" +