Use sh
[llpp.git] / misc / dllpp
blob4719d8a29b5d3edb10e7c88354f57d56075ee80b
1 #!/bin/sh
2 set -e
4 test -z "$1" && {
5 echo "usage: $0 file_extension"
6 exit 1
9 command -v rofi >/dev/null && dmenu()(rofi -dmenu)
11 getpath() {
12 locate -e -0 -r '\.'$1'$' \
13 | du -bh --files0-from=- \
14 | sort -h -k1 | cut --output-delimiter=: -f1,2- \
15 | dmenu -nf white -l 40 | cut -d: -f2- || exit 1
18 exec llppac "$(getpath "$1")"