-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
50 lines (39 loc) · 1.27 KB
/
configure.in
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
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty. This file is offered as-is,
# without any warranty.
CONFIGS='PRIVATE_FRAMEWORK FRAMEWORK_PATH TARGET_IP ENABLE_DEBUG ENABLE_SIMULATION'
CONFIG_PRIVATE_FRAMEWORK() {
enabled() { true; }
prompt() { echo 'Is the Oscar Framework already in the folder ./oscar? (y/n)'; }
default() { echo 'n'; }
check() { grep -xqE 'y|n'; }
[ "$1" ] && "$1"
}
CONFIG_FRAMEWORK_PATH() {
enabled() { [ "$CONFIG_PRIVATE_FRAMEWORK" == 'n' ]; }
prompt() { echo 'Enter the path to the Oscar Framework.'; }
default() { echo '../oscar'; }
check() { grep -xqE '.+'; }
[ "$1" ] && "$1"
}
CONFIG_TARGET_IP() {
enabled() { true; }
prompt() { echo "Enter the IP Address of the target device."; }
default() { echo '192.168.1.10'; }
check() { grep -xqE '[0-9a-zA-Z.:-]*'; }
[ "$1" ] && "$1"
}
CONFIG_ENABLE_DEBUG() {
enabled() { true; }
prompt() { echo 'Do you want to enable debugging symbols? (y/n)'; }
default() { echo 'y'; }
check() { grep -xqE 'y|n'; }
[ "$1" ] && "$1"
}
CONFIG_ENABLE_SIMULATION() {
enabled() { true; }
prompt() { echo 'Do you want to enable IO simulation on the target? (y/n)'; }
default() { echo 'n'; }
check() { grep -xqE 'y|n'; }
[ "$1" ] && "$1"
}