-
Notifications
You must be signed in to change notification settings - Fork 8
/
mkosi.build.chroot
executable file
·91 lines (87 loc) · 1.55 KB
/
mkosi.build.chroot
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -e
TEMP=$( \
getopt \
-o 'c:i' \
--long 'incremental' \
--long 'fstests' \
--long 'kernel' \
--long 'config' \
--long 'btrfs-progs' \
--long 'ltp' \
--long 'bpfilter' \
--long 'bpftrace' \
--long 'fio' \
-n 'mkosi.build' \
-- "$@" \
)
eval set -- "$TEMP"
unset TEMP
while true; do
case "$1" in
'-i'|'--incremental')
INCREMENTAL=1
shift 1
continue
;;
'--fstests')
FSTESTS=1
shift 1
continue
;;
'--kernel')
KERNEL=1
shift 1
continue
;;
'-c'|'--config')
CONFIG="$2"
shift 2
continue
;;
'--ltp')
LTP=1
shift 1
continue
;;
'--btrfs-progs')
BTRFS_PROGS=1
shift 1
continue
;;
'--bpfilter')
BPFILTER=1
shift 1
continue
;;
'--bpftrace')
BPFTRACE=1
shift 1
continue
;;
'--fio')
FIO=1
shift 1
continue
;;
'--')
shift
break
;;
*)
exit 1
;;
esac
done
cat >"$ARTIFACTDIR"/env <<EOF
INCREMENTAL=$INCREMENTAL
FSTESTS=$FSTESTS
KERNEL=$KERNEL
CONFIG=$CONFIG
LTP=$LTP
BTRFS_PROGS=$BTRFS_PROGS
BPFILTER=$BPFILTER
BPFTRACE=$BPFTRACE
FIO=$FIO
EOF