More robust zcat

This commit is contained in:
Anthony Scemama 2023-11-07 11:28:18 +01:00
parent c41737b494
commit c0e76b8f26
1 changed files with 2 additions and 1 deletions

View File

@ -16,7 +16,8 @@ with gzip.open("$1", "rt") as f:
EOF
fi
else
command=$(which -a zcat | grep -v 'qp2/bin/' | head -1)
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
command=$(which -a zcat | grep -v "$SCRIPTPATH/" | head -1)
exec $command $@
fi