Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Utilities/Scripts/update-elf.bash
3148 views
1
#!/usr/bin/env bash
2
3
set -e
4
set -x
5
shopt -s dotglob
6
7
readonly name="elf"
8
readonly ownership="FreeBSD Upstream <[email protected]>"
9
readonly subtree="Utilities/cmelf"
10
readonly repo="https://github.com/freebsd/freebsd-src.git"
11
readonly tag="main"
12
readonly shortlog=false
13
readonly paths="
14
sys/sys/elf32.h
15
sys/sys/elf64.h
16
sys/sys/elf_common.h
17
"
18
19
extract_source () {
20
git_archive
21
pushd "${extractdir}/${name}-reduced"
22
echo "* -whitespace" > .gitattributes
23
mv sys/sys/* .
24
sed -i -e 's/<sys\/elf_common.h>/"elf_common.h"/g' -e 's/u_int32_t/uint32_t/g' *.h
25
popd
26
}
27
28
. "${BASH_SOURCE%/*}/update-third-party.bash"
29
30