case tar.xz in extract util

This commit is contained in:
2025-11-14 10:51:22 +08:00
parent 601ccbaf14
commit c6ca5271e8

View File

@@ -3,6 +3,7 @@ if [ -f "$1" ]; then
case "$1" in
*.tar.bz2) tar -jxvf "$1" ;;
*.tar.gz) tar -zxvf "$1" ;;
*.tar.xz) tar -Jxvf "$1" ;;
*.bz2) bunzip2 "$1" ;;
*.dmg) hdiutil mount "$1" ;;
*.gz) gunzip "$1" ;;