mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-16 15:07:46 +00:00
Not all distros have `/bin/bash`, e.g. NixOS. Fixes: #3450 Signed-off-by: Sebastian Hasler <sebastian.hasler@stuvus.uni-stuttgart.de>
25 lines
484 B
Bash
Executable File
25 lines
484 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright (c) 2020 Ant Group
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
set -e
|
|
|
|
install_aarch64_musl() {
|
|
local arch=$(uname -m)
|
|
if [ "${arch}" == "aarch64" ]; then
|
|
local musl_tar="${arch}-linux-musl-native.tgz"
|
|
local musl_dir="${arch}-linux-musl-native"
|
|
pushd /tmp
|
|
if curl -sLO --fail https://musl.cc/${musl_tar}; then
|
|
tar -zxf ${musl_tar}
|
|
mkdir -p /usr/local/musl/
|
|
cp -r ${musl_dir}/* /usr/local/musl/
|
|
fi
|
|
popd
|
|
fi
|
|
}
|
|
|
|
install_aarch64_musl
|