Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Utilities/Scripts/update-elf.bash
4997 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 exact_tree_match=false
14
readonly paths="
15
sys/sys/elf32.h
16
sys/sys/elf64.h
17
sys/sys/elf_common.h
18
"
19
20
extract_source () {
21
git_archive
22
pushd "${extractdir}/${name}-reduced"
23
echo "* -whitespace" > .gitattributes
24
mv sys/sys/* .
25
sed -i -e 's/<sys\/elf_common.h>/"elf_common.h"/g' -e 's/u_int32_t/uint32_t/g' *.h
26
popd
27
}
28
29
. "${BASH_SOURCE%/*}/update-third-party.bash"
30
31