blob: 36d4fbf262a4d84c17c2b424723002f1c5818338 [file] [log] [blame]
Joey Armstronga5278142023-06-28 16:56:54 -04001#!/bin/bash
2# -----------------------------------------------------------------------
Joey Armstrong098eedd2024-02-11 10:00:59 -05003# Copyright 2023-2024 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstronga5278142023-06-28 16:56:54 -04004#
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#
Joey Armstrong098eedd2024-02-11 10:00:59 -050017# SPDX-FileCopyrightText: 2024 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstronga5278142023-06-28 16:56:54 -040018# 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)