reverie/tests/shell_tests/build-musl.sh
Jason White 20c7020868 Appease the copyright linter
Summary: The OSS license linter doesn't like the word "its".

Reviewed By: johnhurt

Differential Revision: D36856385

fbshipit-source-id: 909037d96de8976f08004497d28b77838f8c6870
2022-06-02 11:51:06 -07:00

36 lines
889 B
Bash
Executable file

#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
set -e
MUSL_VER=1.2.1
MUSL_SOURCE_WORK_DIR=$(mktemp -d)
MUSL_BUILD_DIR=""
trap cleanup EXIT
function cleanup {
echo "cleanup.." && rm -fr "${MUSL_SOURCE_WORK_DIR}"
}
function prepare {
mkdir -p "${MUSL_SOURCE_WORK_DIR}" && cd "${MUSL_SOURCE_WORK_DIR}"
curl -L $(fwdproxy-config curl) "https://git.musl-libc.org/cgit/musl/snapshot/musl-${MUSL_VER}.tar.gz" | tar -zxf -
mkdir -p "musl-${MUSL_VER}-build" && cd "musl-${MUSL_VER}-build"
MUSL_BUILD_DIR=$(pwd)
}
function build {
if [ "${MUSL_BUILD_DIR}" != "" ]; then
cd "${MUSL_BUILD_DIR}"
../musl-${MUSL_VER}/configure --prefix=""
make -j
fi
}
prepare && build