-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_artifact_kernels.sh
executable file
·60 lines (31 loc) · 2.9 KB
/
create_artifact_kernels.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
. global_exports.sh
# Clone safefetch in case it doesn't exist
[[ ! -d safefetch ]] && git clone ${SAFEFETCH_REPO}
[[ ! -d playground/kernels/safefetch-default ]] && ./save_kernel.sh -clean safefetch
[[ ! -d playground/kernels/safefetch-default ]] && cd safefetch && git checkout main && cd .. && make all_default_safefetch && ./save_kernel.sh -save safefetch safefetch-default && echo '##Compiled safefetch (default config)'
[[ ! -d playground/kernels/safefetch-local ]] && ./save_kernel.sh -clean safefetch
[[ ! -d playground/kernels/safefetch-local ]] && cd safefetch && git checkout main && cd .. && make all_local_safefetch && ./save_kernel.sh -save safefetch safefetch-local && echo '##Compiled safefetch (local config)'
[[ -f /boot/vmlinuz-5.11.0-safefetch+ ]] && ./save_kernel.sh -clean safefetch
[[ ! -d playground/kernels/exploit-default ]] && ./save_kernel.sh -clean exploit
[[ ! -d playground/kernels/exploit-default ]] && cd safefetch && git checkout exploit && cd .. && make all_default_safefetch && ./save_kernel.sh -save exploit exploit-default && echo '##Compiled safefetch-exploit (default config)'
[[ ! -d playground/kernels/exploit-local ]] && ./save_kernel.sh -clean exploit
[[ ! -d playground/kernels/exploit-local ]] && cd safefetch && git checkout exploit && cd .. && make all_local_safefetch && ./save_kernel.sh -save exploit exploit-local && echo '##Compiled safefetch-exploit (local config)'
[[ -f /boot/vmlinuz-5.11.0-exploit+ ]] && ./save_kernel.sh -clean exploit
if [[ "$*" == *"-whitelist"* ]]
then
[[ ! -d playground/kernels/whitelist-default ]] && ./save_kernel.sh -clean whitelist
[[ ! -d playground/kernels/whitelist-default ]] && cd safefetch && git checkout whitelist && cd .. && make all_default_safefetch && ./save_kernel.sh -save whitelist whitelist-default && echo '##Compiled safefetch-whitelist (default config)'
[[ ! -d playground/kernels/whitelist-local ]] && ./save_kernel.sh -clean whitelist
[[ ! -d playground/kernels/whitelist-local ]] && cd safefetch && git checkout whitelist && cd .. && make all_local_safefetch && ./save_kernel.sh -save whitelist whitelist-local && echo '##Compiled safefetch-whitelist (local config)'
[[ -f /boot/vmlinuz-5.11.0-whitelist+ ]] && ./save_kernel.sh -clean whitelist
fi
if [[ "$*" == *"-midas"* ]]
then
[[ ! -d midas ]] && git clone ${MIDAS_REPO}
[[ ! -d playground/kernels/midas-default ]] && ./save_kernel.sh -clean midas
[[ ! -d playground/kernels/midas-default ]] && make all_default_midas && ./save_kernel.sh -save midas midas-default && echo '##Compiled midas (default config)'
[[ ! -d playground/kernels/midas-local ]] && ./save_kernel.sh -clean midas
[[ ! -d playground/kernels/midas-local ]] && make all_local_midas && ./save_kernel.sh -save midas midas-local && echo '##Compiled midas (local config)'
[[ -f /boot/vmlinuz-5.11.0-midas+ ]] && ./save_kernel.sh -clean midas
fi