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.

39 lines
969 B

3 years ago
3 years ago
3 years ago
  1. #!/usr/bin/env bash
  2. function decompressor()
  3. {
  4. case $(lowercase) in
  5. *.tar)
  6. executer tar -xvf $DEST
  7. ;;
  8. *.tar.gz | *.tgz)
  9. executer tar -xzvf $DEST
  10. ;;
  11. *.tar.bz2 | *.tbz | *.tbz2 | *.tb2)
  12. executer tar xjf $DEST
  13. ;;
  14. *.tar.xz | *.txz)
  15. executer tar -xf $DEST
  16. ;;
  17. *.bz2)
  18. executer bzip2 -d $DEST
  19. ;;
  20. *.gz)
  21. executer gzip -d $DEST
  22. ;;
  23. *.zip)
  24. executer unzip $DEST
  25. ;;
  26. *.7z | *.arj | *.cab | *.dmg | *.iso | *.lzh | *.lzma | *.rpm | *.squashfs | *.vdi | *.vhd | *.vmdk | *.win | *.xar | *.z)
  27. executer 7z e -y $DEST
  28. ;;
  29. *.rar)
  30. executer unrar x $DEST
  31. ;;
  32. *)
  33. echo "Extension not found."
  34. echo -e "For more information run 'lch --help'\n"
  35. ;;
  36. esac
  37. echo -e "\nFile $DEST decompressed."
  38. }