function modules
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
function decompressor()
|
||||
{
|
||||
case $1 in
|
||||
*.tar)
|
||||
tar -xvf $1
|
||||
;;
|
||||
*.tar.gz | *.tgz)
|
||||
tar -xzvf $1
|
||||
;;
|
||||
*.tar.bz2 | *.tbz | *.tbz2 | *.tb2)
|
||||
tar xjf $1
|
||||
;;
|
||||
*.tar.xz | *.txz)
|
||||
tar -xf $1
|
||||
;;
|
||||
*.bz2)
|
||||
bzip2 -d $1
|
||||
;;
|
||||
*.gz)
|
||||
gzip -d $1
|
||||
;;
|
||||
*.zip)
|
||||
unzip $1
|
||||
;;
|
||||
*.7z)
|
||||
7za e $1
|
||||
;;
|
||||
*.rar)
|
||||
unrar x $1
|
||||
;;
|
||||
*)
|
||||
echo "Extension not found."
|
||||
echo -e "For more information run 'lch --help'\n"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo -e "\nDone"
|
||||
exit 0
|
||||
}
|
||||
Reference in New Issue
Block a user