Debian Codegraph @

fts/update-musl-fts.sh

raw symbols SCIP
1 #!/bin/sh
2
3 FTS_DIR="$(dirname "$(realpath "$0")")"
4 MUSL_FTS_VERSION=1.2.7
5 MUSL_FTS_TARBALL_URL="https://github.com/void-linux/musl-fts/archive/refs/tags/v$MUSL_FTS_VERSION.tar.gz"
6 MUSL_FTS_SRC_DIR="$FTS_DIR/musl-fts"
7
8 mkdir -p "$MUSL_FTS_SRC_DIR"
9
10 # Download and extract the musl-fts tarball
11 echo "Downloading musl-fts $MUSL_FTS_VERSION"
12 curl -L "$MUSL_FTS_TARBALL_URL" | tar xzf - --strip-component=1 -C "$MUSL_FTS_SRC_DIR" \
13 musl-fts-$MUSL_FTS_VERSION/fts.c \
14 musl-fts-$MUSL_FTS_VERSION/fts.h \
15 musl-fts-$MUSL_FTS_VERSION/COPYING
16
17 for patch in "$FTS_DIR/patches/"*.patch; do
18 echo "Applying patch $patch"
19 patch -p1 -d "$MUSL_FTS_SRC_DIR" < "$patch"
20 done
21
22 cat <<EOF > "$MUSL_FTS_SRC_DIR/NOTICE.wasi-libc.md"
23 This directory contains a copy of the musl-fts library licensed under
24 BSD-3-Clause with wasi-libc modifications. See COPYING for the full license text.
25
26 The original source code can be found at $MUSL_FTS_TARBALL_URL
27
28 ## How to update musl-fts sources
29
30 1. Update the \`MUSL_FTS_VERSION\` variable in \`$0\`
31 2. Run \`$0\`
32 EOF