Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- action=$1
- case $action in
- install)
- shift
- pacaur -S "$@"
- ;;
- upgrade)
- shift
- pacaur -Su "$@"
- ;;
- update)
- shift
- pacaur -Sy "$@"
- ;;
- upup)
- shift
- pacaur -Syu "$@"
- ;;
- remove)
- shift
- pacaur -R "$@"
- ;;
- search)
- shift
- pacaur -Ss "$@"
- ;;
- autoremove)
- shift
- packages_to_remove=$(pacaur -Qdtq)
- if [[ -z "$packages_to_remove" ]]; then
- echo "Nothing to remove, all clean."
- else
- echo "NOTE: This operation might go through multiple cycles (for example when dependencies of dependencies can be removed after the first cycle)."
- echo "This is normal and expected behaviour."
- echo ""
- while [[ -n "$packages_to_remove" ]]; do
- pacaur -R "$packages_to_remove"
- packages_to_remove=$(pacaur -Qdtq)
- done
- fi
- ;;
- -*)
- pacaur "$@"
- ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment