implement cross-platform tar extraction utility with symlink resolution fallback for setup scripts

This commit is contained in:
jarves committed 2026-06-26 10:09:38 +05:30
1 parent 349b9e167f
commit 690cce5cc3
3 files changed
+134 -2

No files matched your search

+5 -1
View File
@@ -25,7 +25,11 @@ download_and_extract() {
echo " >> Downloading $asset"
curl -fSL --progress-bar "$url" -o "$archive.part"
mv "$archive.part" "$archive"
tar -xzf "$archive" -C "$dest" --strip-components=1
if command -v python3 >/dev/null 2>&1; then
python3 "$SCRIPT_DIR/extract_tar.py" --archive "$archive" --dest "$dest" --strip-components=1
else
tar -xzf "$archive" -C "$dest" --strip-components=1
fi
rm -f "$archive"
chmod +x "$dest"/whisper-* "$dest"/main "$dest"/server 2>/dev/null || true