Advertisement
ainumortis

pacman bash script for debian.

Sep 3rd, 2014
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. #!/bin/bash
  2. # Author: Matias Linares ; Ainus Solheim
  3.  
  4. update (){
  5. aptitude update
  6. aptitude upgrade
  7. }
  8.  
  9. install() {
  10. aptitude install $1
  11. }
  12.  
  13. search() {
  14. aptitude search $1
  15. }
  16.  
  17. sync() {
  18. aptitude update
  19. }
  20.  
  21. remove() {
  22. aptitude remove $1
  23. }
  24.  
  25. help() {
  26. echo "Script Bash Pacman Based 1.0"
  27. echo "Author: Matias Linares ; Ainus Solheim"
  28. echo ""
  29. echo "How to use:"
  30. echo " pacman [Option] filename"
  31. echo " Example: pacman -S filename"
  32. echo ""
  33. echo "Options:"
  34. echo ""
  35. echo "--help - Show this text"
  36. echo "-Sy - Syncronize Repositories"
  37. echo "-Syu - Syncronize Repositories and Upgrade packages"
  38. echo "-S - Install a Program"
  39. echo "-R - Remove a Program"
  40. echo "-Ss - Search a Program"
  41. }
  42. case $1 in
  43. -Syu)
  44. update
  45. ;;
  46. -Ss)
  47. search $2
  48. ;;
  49. -S)
  50. install $2
  51. ;;
  52. -Sy)
  53. sync
  54. ;;
  55. -R)
  56. remove $2
  57. ;;
  58. --help)
  59. help
  60. ;;
  61.  
  62. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement