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
908 B

#!/usr/bin/env bash
function compressor()
{
case $(lowercase) in
*.tar)
executer tar -cvf $DEST $ORIG
;;
*.tar.gz | *.tgz)
executer tar -czvf $DEST $ORIG
;;
*.tar.bz2 | *.tbz | *.tbz2 | *.tb2)
executer tar -c $ORIG | bzip2 > $DEST
;;
*.tar.xz | *.txz)
executer tar -cJf $DEST $ORIG
;;
*.bz2)
executer bzip2 -c $ORIG > $DEST
;;
*.gz)
executer gzip -c $ORIG > $DEST
;;
*.zip)
executer zip -r $DEST $ORIG
;;
*.7z)
executer 7z a $DEST $ORIG
;;
*.rar)
executer rar a $DEST $ORIG
;;
*)
echo "Extension not found."
echo -e "For more information run 'lch --help'\n"
;;
esac
echo -e "\nFile $DEST compressed."
}