Skip to content

Commit 77a3bc4

Browse files
committed
Update extract script
Signed-off-by: Bensuperpc <[email protected]>
1 parent 1dd948f commit 77a3bc4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

archive/extract.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ set -euo pipefail
1616
#// - //
1717
#// Source: https://www.quora.com/What-is-the-most-useful-bash-script-that-you-have-ever-written //
1818
#// https://wiki.archlinux.org/title/Archiving_and_compression
19+
#// https://github.com/xvoland/Extract
1920
#// OS: ALL //
2021
#// CPU: ALL //
2122
#// //
@@ -27,6 +28,9 @@ extractAllTypeFiles(){
2728
*.ark) arc x $1 ;;
2829
*.arc) arc x $1 ;;
2930
*.arj) arj e $1 ;;
31+
*.cbt) tar xvf $1 ;;
32+
*.cso) ciso 0 ./"$n" ./"$n.iso" && \
33+
extract $n.iso && \rm -f $n ;;
3034
*.tar.bz2) tar xvjf $1 ;;
3135
*.tar.gz) tar xvzf $1 ;;
3236
*.tar.lzma) tar --lzma -xvf $1 ;;
@@ -47,7 +51,9 @@ extractAllTypeFiles(){
4751
*.tgz) tar xvzf $1 ;;
4852
*.lz4) lz4 -d $1 ;;
4953
*.lzh) lha x $1 ;;
50-
*.zip) unzip $1 ;;
54+
*.xz) unxz $1 ;;
55+
*.exe) cabextract $1 ;;
56+
*.zip|*.epub|*.cbz) unzip $1 ;;
5157
*.7z|*.z|*.apk|*.deb|*.dmg|*.lzh|*.msi|*.pkg|*.rpm|*.udf|*.wim|*.xar) 7z x $1 ;;
5258
*.zst) zstd -dc $1 ;;
5359
*.zpaq) zpaq x $1 ;;
@@ -63,6 +69,7 @@ extractAllTypeFiles(){
6369

6470
if [ $# -eq 0 ]; then
6571
echo "No arguments provided"
72+
echo "Usage: "
6673
exit 1
6774
fi
6875

0 commit comments

Comments
 (0)