blob: e3c5a1eae8c09e6758be9bd3c95d636c1765da51 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#! /bin/sh
set -euf
trap "echo 'You are made of stupid!' >&2; exit 23" EXIT
disarm() {
trap - EXIT
}
COBRA_PATH="${COBRA_PATH-$PWD}"
## main
for target; do
for path in $COBRA_PATH; do
if test -d "$path/$target"; then
if index="$path/$target/index.sh" && test -f "$index"; then
exec /bin/sh "$index"
disarm
fi
fi
done
done
|