blob: 4e4a7f6f217430cc3723bbc30cbe82a4e41073d2 [file] [log] [blame]
Joey Armstrong36c9bcd2023-04-05 19:05:56 -04001#!/bin/bash
2# -----------------------------------------------------------------------
3# Copyright 2023 Open Networking Foundation (ONF) and the ONF Contributors
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17# SPDX-FileCopyrightText: 2023 Open Networking Foundation (ONF) and the ONF Contributors
18# SPDX-License-Identifier: Apache-2.0
19# -----------------------------------------------------------------------
20
21## -----------------------------------------------------------------------
22## Intent: Install a bbsim binary for local development use.
23## -----------------------------------------------------------------------
24## Note: A python or golang script may be a simpler answer.
25## Interpreter modules provide answers for uname -{a,m,o}
26## with dictionary translation into needed values.
27## -----------------------------------------------------------------------
28
29# import platform
30# platform.processor()
31# platform.system # Windows
32
33# lshw: width: 64 bits
34
35# >>> import platform
36# >>> platform.machine()
37# 'x86'
38
39
40# $ uname -m
41# armv7l
42
43## which arch
44# https://github.com/hadolint/hadolint/releases/tag/v2.12.0
45case "$(uname -a)" in
46 *x86_64*)
47esac
48
49os=''
50case "$(uname -o)" in
51 *Linux*) os='Linux'
52esac
53
54
55# hadolint-Darwin-x86_64
56# hadolint-Darwin-x86_64.sha256
57# hadolint-Linux-arm64
58# hadolint-Linux-arm64.sha256
59# hadolint-Linux-x86_64
60# hadolint-Linux-x86_64.sha256
61# hadolint-Windows-x86_64.exe
62# hadolint-Windows-x86_64.exe.sha256
63# Source code (zip)
64# Source code (tar.gz)