dotfiles/bin/findup

14 lines
314 B
Python
Executable file

#! /usr/bin/env python3
import sys
from mbutils import find_in_parent
try:
print(find_in_parent(*sys.argv[1:]))
sys.exit(0)
except IOError:
print("File not found in any directory", file=sys.stderr)
sys.exit(1)
except TypeError:
print("No filename specified", file=sys.stderr)
sys.exit(2)