scripts/lesspipe

17 lines
335 B
Plaintext
Raw Normal View History

2024-03-13 11:49:28 +01:00
#!/bin/sh
# Tiny wrapper to ensure to have 'lesspipe' binary independently of the OS/path
if [ $(command -v lesspipe.sh) ]; then
lesspipe.sh "${*}"
elif [ -f /bin/lesspipe ]; then
/bin/lesspipe "${*}"
elif [ -f /usr/bin/lesspipe ]; then
/usr/bin/lesspipe "${*}"
else
printf '%s' "No lesspipe binary available"
exit 1
fi
exit 0