Advertisement
HiImTye

Launchers/updateCount

Apr 8th, 2014
748
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.31 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. pacmanUpdates=$(pacman -Syup | grep http:// | wc -l)
  4. aurUpdates=$(yaourt -Qua | grep aur | wc -l)
  5.  
  6. if [ "$pacmanUpdates" -gt 0 ]; then
  7.  updateCount="$pacmanUpdates"
  8. elif [ "$aurUpdates" -gt 0 ]; then
  9.  updateCount="A$aurUpdates"
  10. else
  11.  updateCount=0
  12. fi
  13.  
  14. echo "$updateCount" > /tmp/updateCount
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement