Extract .tar.xz properly on Linux

This commit is contained in:
Kenneth Benzie 2021-07-27 23:52:47 +01:00
parent 85b531e773
commit b89428cd32
2 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,7 @@
- zsh
- zsh-doc
- pinentry-curses
- xz-utils
- brew:
- zsh
- pacman:
@ -11,6 +12,7 @@
- dnf:
- util-linux-user
- zsh
- xz
- command:
- install: sudo chsh -s `which zsh` $USER
remove: sudo chsh -s `which bash` $USER

View File

@ -44,7 +44,7 @@ extract() {
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.tar.xz) [ `"uname"` = "Darwin" ] && tar xvJf $1 || gunzip $1 ;;
*.tar.xz) [ `"uname"` = "Darwin" ] && tar xvJf $1 || tar xf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;