tool.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #!/bin/bash
  2. function pack_ {
  3. tar cvfJ 99XAUD33.tar.xz 99XAUD33
  4. tar cvfJ AORUS_Z370.tar.xz AORUS_Z370
  5. tar cvfJ ASUS_X75VC.tar.xz ASUS_X75VC
  6. tar cvfJ FM2A88M-extreme4.tar.xz FM2A88M-extreme4
  7. tar cvfJ MR3020.tar.xz MR3020
  8. tar cvfJ WR703N.tar.xz WR703N
  9. rm -r AORUS_Z370 ASUS_X75VC FM2A88M-extreme4 MR3020 WR703N 99XAUD33
  10. }
  11. function unpack_ {
  12. tar xvfJ 99XAUD33.tar.xz
  13. tar xvfJ AORUS_Z370.tar.xz
  14. tar xvfJ ASUS_X75VC.tar.xz
  15. tar xvfJ FM2A88M-extreme4.tar.xz
  16. tar xvfJ MR3020.tar.xz
  17. tar xvfJ WR703N.tar.xz
  18. }
  19. function clean_ {
  20. rm -r AORUS_Z370 ASUS_X75VC FM2A88M-extreme4 MR3020 WR703N 99XAUD33
  21. }
  22. function show_help {
  23. echo "\
  24. Usage: $0 [--pack] [--unpack] [--clean] [--help]
  25. --help Display extended help message
  26. --pack Pack files
  27. --unpack Unpack files
  28. --clean Clean files
  29. Install script Written by: wareck <wareck@gmail.com>
  30. "
  31. }
  32. if [ "$#" == "0" ]; then
  33. $0 *
  34. exit 0
  35. fi
  36. for i in "$@"
  37. do
  38. case $i in
  39. --help)
  40. show_help
  41. exit
  42. ;;
  43. --pack)
  44. pack_
  45. ;;
  46. --unpack)
  47. unpack_
  48. ;;
  49. --clean)
  50. clean_
  51. ;;
  52. *)
  53. show_help
  54. exit
  55. ;;
  56. esac
  57. done