fix appdwarf indentation

This commit is contained in:
Phantop 2024-08-19 01:59:41 -04:00
parent 4f6c908ee9
commit a9d91c3471

View file

@ -205,22 +205,22 @@ if [ ! -d "$1" ]; then # directory doesn't exist, see if this is an appimage
printf '\e[0m' printf '\e[0m'
zzexe -z "$@" zzexe -z "$@"
fi fi
fi fi
head="$(mktemp)" head="$(mktemp)"
if [ "$bundle" ]; then { # behavior for bundling a dwarfs executable if [ "$bundle" ]; then { # behavior for bundling a dwarfs executable
zdata="$(mktemp)" zdata="$(mktemp)"
zstd -cq "$bundle" > "$zdata" zstd -cq "$bundle" > "$zdata"
outfunc outfunc
echo "off=$(($( (outfunc; outfunc bundlehead; outfunc header) | wc -l)+3))" echo "off=$(($( (outfunc; outfunc bundlehead; outfunc header) | wc -l)+3))"
echo "len=$(($(wc -l < "$zdata")+1))" echo "len=$(($(wc -l < "$zdata")+1))"
outfunc bundlehead outfunc bundlehead
} > "$head" } > "$head"
fi fi
outfunc header >> "$head" outfunc header >> "$head"
test "$bundle" && cat "$zdata" >> "$head" test "$bundle" && cat "$zdata" >> "$head"
echo >> "$head" echo >> "$head"
mkdwarfs -o "$(realpath "$1").sh" -B5 --header "$head" -i "$@" --categorize=pcmaudio -C pcmaudio/waveform::flac:level=8 mkdwarfs -o "$(realpath "$1").sh" -B5 --header "$head" -i "$@" --categorize=pcmaudio -C pcmaudio/waveform::flac:level=8
rm -rf "$head" "$1" rm -rf "$head" "$1"
chmod +x "$(realpath "$1").sh" chmod +x "$(realpath "$1").sh"