zzexe: fix path input to allow /'es

This commit is contained in:
Phantop 2022-04-26 13:20:58 -04:00
parent fc6002e56f
commit 9e948de066
1 changed files with 1 additions and 1 deletions

2
zzexe
View File

@ -3,7 +3,7 @@ set -e # exit on failure
IFS=$(printf '\n\t') # smarter ifs
[ "$1" = "-d" ] && tail -n+10 "$2" | zstd -cd | ifne sponge "$2" && exit
[ "$1" = "-p" ] && p="$2" && shift 2 # save prefix if present
{ cat << 'EOF'; zstdmt -c19 "$@"; } | sed "2s/$/${1##*.})/;7s/^/$p /" | sponge "$1"
{ cat << 'EOF'; zstdmt -c19 "$@"; } | sed "2s/$/${1##*[./]})/;7s/^/$p /" | sponge "$1"
#!/bin/sh
dir=$(dirname "$0") out=$(mktemp -t .zzXXXX.
tail -n+10 "$0" | zstd -cd > "$out"