a bash script to wrap apt syntax into pacman commands
write the above script into a file called apt. copy it into /usr/bin. Apply the execution permission with chmod +x /usr/bin/apt
| #!/bin/bash | |
| # apt syntax -> pacman wrapper | |
| case "$1" in | |
| "install") | |
| pacman -S ${@:2} | |
| ;; | |
| "remove") | |
| pacman -R ${@:2} | |
| ;; | |
| "purge") | |
| pacman -Rsc ${@:2} | |
| ;; | |
| "update") | |
| pacman -Syu | |
| ;; | |
| "upgrade") | |
| pacman -Syu | |
| ;; | |
| "search") | |
| pacman -Ss ${@:2} | |
| ;; | |
| *) | |
| echo "Error: invalid operation \"$1\"" | |
| ;; | |
| esac |