summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorniklas <niklas@openbsd.org>1997-01-07 15:38:58 +0000
committerniklas <niklas@openbsd.org>1997-01-07 15:38:58 +0000
commite7f0a3abefdcacc0b2635c0e191aebcc4939a36b (patch)
tree24f1d49ee523bed1aea984592385554d5df3f6a4
parentDOH! Fixing big endian broke little.. (diff)
downloadwireguard-openbsd-e7f0a3abefdcacc0b2635c0e191aebcc4939a36b.tar.xz
wireguard-openbsd-e7f0a3abefdcacc0b2635c0e191aebcc4939a36b.zip
Return a sane return value so the bsd.port.mk conditions work
-rw-r--r--usr.bin/which/which.csh13
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.bin/which/which.csh b/usr.bin/which/which.csh
index f958018d6db..fd9ffe6dd13 100644
--- a/usr.bin/which/which.csh
+++ b/usr.bin/which/which.csh
@@ -1,5 +1,5 @@
#!/bin/csh
-# $OpenBSD: which.csh,v 1.2 1996/06/26 05:42:58 deraadt Exp $
+# $OpenBSD: which.csh,v 1.3 1997/01/07 15:38:58 niklas Exp $
#
# DO NOT USE "csh -f"
@@ -67,11 +67,22 @@ foreach arg ( $argv )
if ( -x $i/$arg && ! -d $i/$arg ) then
echo $i/$arg
set found
+ set one_found
break
endif
end
endif
if ( ! $?found ) then
echo no $arg in $path
+ set one_missed
endif
end
+if ( $?one_missed ) then
+ if ( $?one_found ) then
+ exit 1
+ else
+ exit 2
+ endif
+else
+ exit 0
+endif