1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-01 15:26:01 +00:00
oot/tools/fado/find_program.sh
EllipticEllipsis 6fd0f3cff2
git subrepo pull --force tools/fado (#1138)
subrepo:
  subdir:   "tools/fado"
  merged:   "a0fa82808"
upstream:
  origin:   "git@github.com:EllipticEllipsis/fado.git"
  branch:   "master"
  commit:   "a0fa82808"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"
2022-02-11 15:09:27 -05:00

16 lines
311 B
Bash
Executable file

#!/usr/bin/env bash
for i in "${@:2}"
do
RESULT=$(IFS=:;find $PATH -maxdepth 1 -name "$i" -print -quit 2> /dev/null | grep -o '[^/]*$')
COUNT=$(echo "$RESULT" | wc -c)
if [ $COUNT -gt 1 ]
then
echo $RESULT
exit 0
fi
done
echo $1
exit 0