mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-24 23:36:04 +00:00
fix(appimage): DwarFS AppImages unpack without proot (#3161)
This commit is contained in:
1 parent
f934feb457
commit
43ff1db06b
12 files changed
+208
-1
No files matched your search
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
wrapper=${1:?usage: unwrap-dwarfs.sh WRAPPER OUTPUT}
|
||||
output=${2:?usage: unwrap-dwarfs.sh WRAPPER OUTPUT}
|
||||
[ "$(tail -c 32 "$wrapper" | head -c 8)" = "SQUEEZE!" ] || { echo "unwrap-dwarfs.sh: $wrapper has no SQUEEZE! trailer" >&2; exit 1; }
|
||||
packed=$(tail -c 16 "$wrapper" | od -An -tu8 -N8 | tr -d ' ')
|
||||
[ "$packed" -gt 0 ] && [ "$packed" -le $(( $(wc -c < "$wrapper") - 32 )) ] || { echo "unwrap-dwarfs.sh: bad payload size in $wrapper" >&2; exit 1; }
|
||||
tail -c $((packed + 32)) "$wrapper" | head -c "$packed" | zstd -dcq > "$output"
|
||||
Reference in new issue
Block a user