summaryrefslogtreecommitdiffstats
path: root/contrib/bind/port/systype
blob: b022651e4e74137828efb88f57c3b2c22692b4c1 (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
#!/bin/sh

cachefile=${1-//}

if [ -f $cachefile ]; then
	echo "Using $cachefile" >&2
	exec cat $cachefile
fi

case $cachefile in
/*) ;;
*) cachefile=`pwd`/$cachefile ;;
esac

cd `dirname $0`
for systype in [a-z]*; do
	if [ -f $systype/probe ]; then
		if sh $systype/probe; then
			case $cachefile in
			//)	;;
			*) 	echo "Making $cachefile" >&2
				echo $systype > $cachefile
				;;
			esac
			exec echo $systype
		fi
	fi
done

echo unknown
exit 0
OpenPOWER on IntegriCloud