mirror of
https://github.com/facebookexperimental/reverie.git
synced 2025-02-09 21:56:13 +00:00
15d2f61411
fbshipit-source-id: c440d991296c92bdc5e109a11d269049e8840e94
36 lines
887 B
Bash
Executable file
36 lines
887 B
Bash
Executable file
#!/bin/bash
|
|
# Copyright (c) Facebook, Inc. and its 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
|