upk 508 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/sh
  2. if test "$1" = "-i"
  3. then
  4. apt-get install $2
  5. elif test "$1" = "-u"
  6. then
  7. apt-get update
  8. elif test "$1" = "-c"
  9. then
  10. apt-get clean
  11. elif test "$1" = "-h"
  12. then
  13. apt-cache show $2
  14. elif test "$1" = "-g"
  15. then
  16. apt-get update && apt-get upgrade
  17. elif test "$1" = "-r"
  18. then
  19. apt-get remove $2
  20. elif test "$1" = "-p"
  21. then
  22. apt-get purge $2
  23. elif test "$1" = "-d"
  24. then
  25. apt-get download $2
  26. elif test "$1" = "-o"
  27. then
  28. apt-get source $2
  29. elif test "$1" = "-f"
  30. then
  31. apt-get install -f
  32. else
  33. echo E: Invalid operation $1
  34. fi