Simple image host.
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.

123456789101112131415161718192021
  1. #!/bin/bash
  2. if [ "$1" = "" ]; then
  3. echo "Usage: munzip <file>";
  4. exit 1;
  5. fi
  6. if [ "$1" = *.tar.gz ]; then
  7. tar vxzf "$1"
  8. elif [ "$1" = *.tar.bz2 ]; then
  9. tar vjxf "$1"
  10. elif [ "$1" = *.tar.xz ]; then
  11. tar vxJf "$1"
  12. elif [ "$1" = *.zip ]; then
  13. unzip "$1"
  14. elif [ "$1" = *.tgz ]; then
  15. tar vxzf "$1"
  16. else
  17. echo "Unknown format."
  18. exit 1
  19. fi