mm/tools/fado/find_program.sh
EllipticEllipsis 26c8cdd221
New relocation-generating program (#393)
* git subrepo clone git@github.com:EllipticEllipsis/fado.git tools/fado

subrepo:
  subdir:   "tools/fado"
  merged:   "d202857b"
upstream:
  origin:   "git@github.com:EllipticEllipsis/fado.git"
  branch:   "master"
  commit:   "d202857b"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* Makefile adjustments and additions to build fado

* git subrepo pull --force tools/fado

subrepo:
  subdir:   "tools/fado"
  merged:   "46c4d751"
upstream:
  origin:   "git@github.com:EllipticEllipsis/fado.git"
  branch:   "master"
  commit:   "46c4d751"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* git subrepo pull --force tools/fado

subrepo:
  subdir:   "tools/fado"
  merged:   "88114ebc"
upstream:
  origin:   "git@github.com:EllipticEllipsis/fado.git"
  branch:   "master"
  commit:   "88114ebc"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* Fix typo in makefile

* Fix it, maybe?

* git subrepo pull tools/fado

subrepo:
  subdir:   "tools/fado"
  merged:   "f7efb10a9"
upstream:
  origin:   "git@github.com:EllipticEllipsis/fado.git"
  branch:   "master"
  commit:   "f7efb10a9"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* Update build tools
2022-08-04 04:49:25 +01:00

17 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