Linux Compressor Humanizer https://lch.hatthieves.es
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

40 lines
969 B

#!/usr/bin/env bash
function decompressor()
{
case $(lowercase) in
*.tar)
executer tar -xvf $DEST
;;
*.tar.gz | *.tgz)
executer tar -xzvf $DEST
;;
*.tar.bz2 | *.tbz | *.tbz2 | *.tb2)
executer tar xjf $DEST
;;
*.tar.xz | *.txz)
executer tar -xf $DEST
;;
*.bz2)
executer bzip2 -d $DEST
;;
*.gz)
executer gzip -d $DEST
;;
*.zip)
executer unzip $DEST
;;
*.7z | *.arj | *.cab | *.dmg | *.iso | *.lzh | *.lzma | *.rpm | *.squashfs | *.vdi | *.vhd | *.vmdk | *.win | *.xar | *.z)
executer 7z e -y $DEST
;;
*.rar)
executer unrar x $DEST
;;
*)
echo "Extension not found."
echo -e "For more information run 'lch --help'\n"
;;
esac
echo -e "\nFile $DEST decompressed."
}