add cinit-0.3pre16

Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
Nico Schottelius 2009-09-29 21:36:27 +02:00
commit 0c13ed6979
1089 changed files with 101811 additions and 0 deletions

View file

@ -0,0 +1,26 @@
#!/bin/sh
# Nico Schottelius
# cinit: find binary in path
# Date: 2005-10-15
#
set -e
if [ $# -ne 1 ]; then
echo "$(basename $0): searched binary"
exit 1
fi
binary=$1
# this is NOT really clean, paths can also contain spaces
# FIXME: use awk or similar
for pfad in $(echo $PATH | sed 's/:/ /g'); do
fullname=$pfad/$binary
if [ -f "$fullname" ]; then
echo "$fullname"
exit 0
fi
done
exit 1