payload has to create directory before extraction

master
Alessandro Mauri 4 years ago
parent 9c5341a976
commit b0b25ba7ff
  1. 4
      posix/payload

@ -9,6 +9,10 @@ else
destdir="$XDG_CACHE_HOME"/tarinstall destdir="$XDG_CACHE_HOME"/tarinstall
fi fi
if ! [ -d "$destdir" ]; then
mkdir -p "$destdir"
fi
if ! [ "$(head -n 1 "$destdir"/ID/checksum 2>/dev/null)" = 'SUM' ]; then if ! [ "$(head -n 1 "$destdir"/ID/checksum 2>/dev/null)" = 'SUM' ]; then
tail -c +BYTES "$0" | lz4 -dc | tar -x -C "$destdir" tail -c +BYTES "$0" | lz4 -dc | tar -x -C "$destdir"
echo "SUM" > "$destdir"/ID/checksum echo "SUM" > "$destdir"/ID/checksum

Loading…
Cancel
Save