This repository was archived by the owner on Mar 13, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdevel-build.sh
More file actions
executable file
·64 lines (49 loc) · 1.78 KB
/
devel-build.sh
File metadata and controls
executable file
·64 lines (49 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env bash
set -xeuo pipefail
mkdir /rootfs
copy_binary () {
local file="$1"
local rootfs="$2"
cp --parents -a -n -v "$file" "$rootfs" && \
ldd "$file" | grep -o '/[^ ]*' | xargs -I '{}' cp -P --parents -n -v '{}' "$rootfs"
}
copy_recursively () {
local file="$1"
local rootfs="$2"
cp --parents -a -n -v -r "$file" "$rootfs"
}
copy_binary /usr/bin/wl-copy /rootfs
copy_binary /usr/bin/wl-paste /rootfs
# gcc
copy_binary /usr/bin/gcc /rootfs
copy_binary /usr/bin/c++ /rootfs
copy_binary /usr/bin/cc /rootfs
copy_binary /usr/bin/cpp /rootfs
copy_binary /usr/bin/gcc-ar /rootfs
copy_binary /usr/bin/gcc-nm /rootfs
copy_binary /usr/bin/gcc-ranlib /rootfs
copy_binary /usr/bin/gcov /rootfs
copy_binary /usr/bin/gcov-tool /rootfs
for f in $(find /usr/bin/x86_64-unknown-linux-gnu-*); do
copy_binary "$f" /rootfs
done
copy_binary /usr/bin/just /rootfs
# there's no manpages in non-devel ocis, let's add that
copy_recursively /usr/share/man /rootfs
# manually copy completions for wl-copy and wl-paste
copy_recursively /usr/share/bash-completion/completions/wl-copy /rootfs
copy_recursively /usr/share/fish/vendor_completions.d/wl-copy.fish /rootfs
copy_recursively /usr/share/zsh/site-functions/_wl-copy /rootfs
copy_recursively /usr/share/bash-completion/completions/wl-paste /rootfs
copy_recursively /usr/share/fish/vendor_completions.d/wl-paste.fish /rootfs
copy_recursively /usr/share/zsh/site-functions/_wl-paste /rootfs
# stuff for gcc
copy_recursively /usr/share/gcc-* /rootfs
copy_recursively /usr/include/c++ /rootfs
copy_recursively /usr/lib/gcc /rootfs
copy_recursively /usr/libexec/gcc /rootfs
copy_recursively /usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.*.py /rootfs
mv /rootfs/lib64 /rootfs/usr/lib64
ln -s usr/lib64 /rootfs/lib64
find /rootfs
ls -la /rootfs