Guest User

Untitled

a guest
May 27th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. # check_updates.sh
  4. #
  5. # CREATED: 2008-11-03 13:32
  6. # MODIFIED: 2010-06-02 20:47
  7. #
  8. ignore=$(ed -rn '/^\s*IgnorePkg/{s/.*=\s*//; s/\s+/|/gp}' /etc/pacman.conf)
  9. updates=$(pacman -Qqu | grep -Ev "^($ignore)$" | wc -l)
  10.  
  11. [ $updates -gt 0 ] && echo -n " $updates update"
  12. [ $updates -gt 1 ] && echo "s" || exit 0
Add Comment
Please, Sign In to add comment