#!/bin/sh #!/usr/bin/env bash # __author__='Lilian Besson' # __email__='lilian DOT besson AT normale DOT fr' # __date__='mar. 12/03/2013 at 14h:56m:39s ' # __webaddress__='https://sites.google.com/site/naereencorp/conky' # __license__='GPL v3' # # A simple script to give the $DEBEMAIL of your account to Conky # *WARNING* you have to define your DEBEMAIL in your ~/.bashrc # # (c) Naereen Corp. 2013 if [ "0$DEBEMAIL" = "0" ] then echo $(grep 'export DEBEMAIL=' ~/.bashrc) | sed s{'export DEBEMAIL='{''{ | sed s{'"'{''{ else ret=`gpg --list-secret-keys | grep "uid" | head -n1 | sed s{'uid [[:blank:]]*'{''{ | sed s{'\([[:alnum:]]*[[:blank:]]*\)*<'{''{ | sed s{'>'{''{` if [ "0$?" = "00" ] then echo $ret | sed s{'"'{''{ else if [ "0$EMAIL" = "0" ] then echo $(grep 'export EMAIL=' ~/.bashrc) | sed s{'export EMAIL='{''{ | sed s{'"'{''{ else echo $EMAIL | sed s{'"'{''{ fi fi fi