Advertisement
HiImTye

Launchers/.tconk-scripts-checkGmail.sh

Apr 8th, 2014
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.72 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. settings="$HOME/Launchers"/.tconk-settings-general
  4. # load variables from files
  5. . "$settings"
  6. . "$accountInfo"
  7.  
  8. # make sure that you have an 'account info' file at the above location
  9.  # with the following inside of it:
  10.  #
  11.  # username=<gmail username>
  12.  # password=<gmail password>
  13.  #
  14.  # make sure that <gmail username> is only the stuff before the '@' sign.
  15.  # it would be 'username=example' if your email address was 'example@gmail.com'
  16.  
  17. mailcount="$(wget -q -O - https://mail.google.com/a/gmail.com/feed/atom --http-user="$username"@gmail.com --http-password="$password" --no-check-certificate | grep -oE "<fullcount>[0-9]+</fullcount>" | sed 's|<[^0-9]*>||g')"
  18. echo "$mailcount" > "$tmpfolder"/time-mail
  19. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement