zypper 544 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/sh
  2. update() {
  3. if test $# = 0
  4. then
  5. apt-get update && apt-get upgrade
  6. else
  7. apt-get install $1
  8. fi
  9. }
  10. if test "$1" = "install"
  11. then
  12. apt-get install $2
  13. elif test "$1" = "update"
  14. then
  15. update $2
  16. elif test "$1" = "search"
  17. then
  18. apt-cache search $2
  19. elif test "$1" = "info"
  20. then
  21. apt-cache show $2
  22. elif test "$1" = "dup"
  23. then
  24. apt-get update && apt-get upgrade
  25. elif test "$1" = "remove"
  26. then
  27. apt-get purge $2
  28. elif test "$1" = "rm"
  29. then
  30. apt-get purge $2
  31. elif test "$1" = "in"
  32. then
  33. apt-get install $2
  34. else
  35. echo E: Invalid operation $1
  36. fi