Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Author: Matias Linares ; Ainus Solheim
- update (){
- aptitude update
- aptitude upgrade
- }
- install() {
- aptitude install $1
- }
- search() {
- aptitude search $1
- }
- sync() {
- aptitude update
- }
- remove() {
- aptitude remove $1
- }
- help() {
- echo "Script Bash Pacman Based 1.0"
- echo "Author: Matias Linares ; Ainus Solheim"
- echo ""
- echo "How to use:"
- echo " pacman [Option] filename"
- echo " Example: pacman -S filename"
- echo ""
- echo "Options:"
- echo ""
- echo "--help - Show this text"
- echo "-Sy - Syncronize Repositories"
- echo "-Syu - Syncronize Repositories and Upgrade packages"
- echo "-S - Install a Program"
- echo "-R - Remove a Program"
- echo "-Ss - Search a Program"
- }
- case $1 in
- -Syu)
- update
- ;;
- -Ss)
- search $2
- ;;
- -S)
- install $2
- ;;
- -Sy)
- sync
- ;;
- -R)
- remove $2
- ;;
- --help)
- help
- ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement