-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fetch.sh
41 lines (28 loc) · 935 Bytes
/
fetch.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
mkdir .temp
git clone --recursive https://github.com/brutal-org/brutal.git .temp
# prerequisites:
rm -rf libs
mkdir libs
rm -rf headers
mkdir headers
# copy lib
cp -r .temp/sources/libs/ .
# gen headers
cd .temp
if [[ -z "${GITHUB_ACTIONS}" ]]; then
echo "! GITHUB_ACTIONS is not set, we expect you to have installed every brutal dependencies !"
else
bash sources/build/scripts/setup-ubuntu.sh
fi
bash brutal.sh -a -f
cp -r ./bin/generated/headers/ ..
cd ..
rm -rf .temp
# remove unused arch utils
cd libs/embed/
# // obligated because ./*.h is the same as ./**.h
# v = (path != ./*/*.h) && (path == ./*.h)
# delete(v) if (path != x86_64/**) && (path != sdl/**) && (path != posix/**)
find . -type f \( \( -not -path './*/*.h' \) -and \( -path './*.h' \) -prune \) -o -type f \( -not -path './x86_64/**' \) -and \( -not -path './sdl/**' \) -and \( -not -path './posix/**' \) -exec rm {} +
cd ../..