From 9c5c2d9d454965ae33f0abaf2fc91f54ab8f319f Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 26 Apr 2008 17:41:53 +0000 Subject: [PATCH] Added "which" script, so that the command can be invoked in shell scripts, too. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25190 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- build/jam/HaikuImage | 3 +++ data/bin/which | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100755 data/bin/which diff --git a/build/jam/HaikuImage b/build/jam/HaikuImage index a14b6a4f89..7b0ad68312 100644 --- a/build/jam/HaikuImage +++ b/build/jam/HaikuImage @@ -212,6 +212,9 @@ AddFilesToHaikuImage beos apps : $(BEOS_APPS) ; AddFilesToHaikuImage beos preferences : $(BEOS_PREFERENCES) ; AddFilesToHaikuImage beos demos : $(BEOS_DEMOS) ; +SEARCH on which = [ FDirName $(HAIKU_TOP) data bin ] ; +AddFilesToHaikuImage beos bin : which ; + AddSymlinkToHaikuImage beos bin : sh : bash ; AddSymlinkToHaikuImage home Desktop : /boot/home : Home ; diff --git a/data/bin/which b/data/bin/which new file mode 100755 index 0000000000..8d8d3583f3 --- /dev/null +++ b/data/bin/which @@ -0,0 +1,6 @@ +#!/bin/bash + +. /etc/profile &> /dev/null + +whence $* +