blob: 81a7488a2fdd0f5b7d04b9980ff6887495810810 (
plain)
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
|
fn_find_fpath() {
save_ifs="$IFS"
IFS="${IFS}:"
for dir in $3 ; do
if test $1 $dir/$2 ; then
IFS="$save_ifs"
return 0
fi
done
IFS="$save_ifs"
return 1
}
fn_find_type() {
fail=$1
shift
text=$1
shift
for fn in $* ; do
if test -f "$fn" ; then
grep "$text" <$fn >/dev/null
if test ! $? = 1 ; then
return 1
fi
fi
done
echo "#define "$fail >>$CONFIG
return 0
}
fn_find_file() {
if test ! -f $2 ; then
echo "#define "$1 >>$CONFIG
return 1
fi
return 0
}
|