Fix bad use of library, copying string over itself
[users/jgh/exim.git] / test / src / locate.sh
1 #!/bin/sh
2
3 [ -d bin.sys ] || mkdir bin.sys
4 cd bin.sys
5
6 while [ $# -gt 0 ]
7 do
8   while read d
9   do
10     if [ -x $d/$1 ]
11     then
12       rm -f ./$1
13       ln -s $d/$1 .
14       break
15     fi
16   done <<-HERE
17         /bin
18         /usr/bin
19         /usr/sbin
20         /usr/libexec
21         /usr/local/bin
22         `find /usr/lib/postgresql -name bin -type d`
23 HERE
24   shift
25 done
26