Compare commits

...

2 Commits

Author SHA1 Message Date
Emre AKYÜZ
afc78d5119
Merge b68ee2d2639ff9b80adf998f4f77b57103b7818c into b8cd0ab4953d053fef09c48ba04f2fbb2df57aa4 2023-09-10 12:54:10 +03:00
Emre AKYÜZ
b68ee2d263
Unpack Function for LF Without Aunpack
We can simply eliminate the usage of an external tool by adding a simple case statement to handle different types of compressed files.
2023-05-25 09:48:32 +03:00

View File

@ -58,7 +58,22 @@ cmd extract ${{
printf "%s\n\t" "$fx"
printf "extract?[y/N]"
read ans
[ $ans = "y" ] && aunpack $fx
[ $ans = "y" ] && {
case $fx in
*.tar.bz2) tar xjf $fx ;;
*.tar.gz) tar xzf $fx ;;
*.bz2) bunzip2 $fx ;;
*.rar) unrar e $fx ;;
*.gz) gunzip $fx ;;
*.tar) tar xf $fx ;;
*.tbz2) tar xjf $fx ;;
*.tgz) tar xzf $fx ;;
*.zip) unzip $fx ;;
*.Z) uncompress $fx ;;
*.7z) 7z x $fx ;;
*.tar.xz) tar xf $fx ;;
esac
}
}}
cmd delete ${{