Add lesspipe wrapper

This commit is contained in:
gardouille 2024-03-13 11:49:28 +01:00
parent 2509c9d6ae
commit 5ab3c6f680
Signed by: gardouille
GPG Key ID: E759BAA22501AF32

16
lesspipe Executable file
View File

@ -0,0 +1,16 @@
#!/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