emerge 374 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. if test "$1" = "--ask"
  3. then
  4. apt-get install ${@:2}
  5. elif test "$1" = "-a"
  6. then
  7. apt-get install ${@:2}
  8. elif test "$1" = "--sync"
  9. then
  10. apt-get update
  11. elif test "$1" = "--search"
  12. then
  13. apt-cache search $2
  14. elif test "$1" = "--update"
  15. then
  16. apt-get update && apt-get upgrade
  17. elif test "$1" = "--unmerge"
  18. then
  19. apt-get remove ${@:2}
  20. else
  21. echo E: Invalid operation $1
  22. fi