zypper 455 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. else
  29. echo E: Invalid operation $1
  30. fi