-
Notifications
You must be signed in to change notification settings - Fork 2
/
prune_gcc.sh
executable file
·25 lines (22 loc) · 1.22 KB
/
prune_gcc.sh
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
#!/usr/bin/env bash
set -eux
rm -rf /var/buildlibs/gcc/bin
rm -rf /var/buildlibs/gcc/usr/bin
rm -rf /var/buildlibs/gcc/libexec
rm -rf /var/buildlibs/gcc/share
if [ "$ARCH" == 'x86_64' ]; then
mv /var/buildlibs/gcc/lib/gcc/${ARCH}-linux /var/buildlibs/gcc/lib/gcc/${ARCH}-linux-gnu
mv /var/buildlibs/gcc/lib/gcc/${ARCH}-linux-gnu/10.3.0 /var/buildlibs/gcc/lib/gcc/${ARCH}-linux-gnu/10
mv /var/buildlibs/gcc/include/c++/10.3.0 /var/buildlibs/gcc/include/c++/10
mv /var/buildlibs/gcc/include/c++/10/${ARCH}-linux /var/buildlibs/gcc/include/c++/10/${ARCH}-linux-gnu
elif [ "$ARCH" == 'aarch64' ]; then
mv /var/buildlibs/gcc/lib/gcc/${ARCH}-linux /var/buildlibs/gcc/lib/gcc/${ARCH}-linux-gnu
mv /var/buildlibs/gcc/lib/gcc/${ARCH}-linux-gnu/10.3.0 /var/buildlibs/gcc/lib/gcc/${ARCH}-linux-gnu/10
mv /var/buildlibs/gcc/${ARCH}-linux/include/c++/10.3.0 /var/buildlibs/gcc/${ARCH}-linux/include/c++/10
mv /var/buildlibs/gcc/${ARCH}-linux/include/c++/10/${ARCH}-linux /var/buildlibs/gcc/${ARCH}-linux/include/c++/10/${ARCH}-linux-gnu
mv /var/buildlibs/gcc/${ARCH}-linux/include/c++ /var/buildlibs/gcc/include/c++
mv /var/buildlibs/gcc/${ARCH}-linux/lib64/* /var/buildlibs/gcc/lib64/
rm -r /var/buildlibs/gcc/${ARCH}-linux
else
exit 1
fi