~ubuntu-branches/ubuntu/intrepid/debian-installer-utils/intrepid

« back to all changes in this revision

Viewing changes to search-path

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2004-10-06 14:35:42 UTC
  • Revision ID: james.westby@ubuntu.com-20041006143542-uvoedmvwb1zn0jv9
Tags: 1.08
* Updated translations: 
  - Welsh (cy.po) by Dafydd Harries
  - Hebrew (he.po) by Lior Kaplan
  - Hungarian (hu.po) by VEROK Istvan
  - Romanian (ro.po) by Eddy Petrisor
  - Traditional Chinese (zh_TW.po) by Tetralet

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
# A cut-down version of 'which' from debianutils. Returns zero if executable
 
3
# $1 is found on $PATH.
 
4
PROGRAM="$1"
 
5
IFS=:
 
6
RET=1
 
7
for ELEMENT in $PATH; do
 
8
    if [ -z "$ELEMENT" ]; then ELEMENT=.; fi
 
9
    if [ -f "$ELEMENT/$PROGRAM" ] && [ -x "$ELEMENT/$PROGRAM" ]; then
 
10
        exit 0
 
11
    fi
 
12
done
 
13
exit 1