From 18d8ef4ef0638fd445e65a61414e3d85d608d84d Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 10 Nov 2011 21:02:07 +0000 Subject: improved it --- hack_of_all_hacks | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'hack_of_all_hacks') diff --git a/hack_of_all_hacks b/hack_of_all_hacks index 1e42457..6c52356 100644 --- a/hack_of_all_hacks +++ b/hack_of_all_hacks @@ -137,15 +137,15 @@ EOF ##################### # If pbot is present record it. - [[ ${sender%%!*} == pbot ]] && touch pbot_present + [[ ${sender%%!*} == pbot ]] && echo yes > pbot_present - # If pbot is not present. - if ! [[ -f pbot_present ]] + if [[ ${line} =~ http://[^\ ]+ ]] || [[ ${line} =~ https://[^\ ]+ ]] then - if [[ ${line} =~ http://[^\ ]+ ]] || [[ ${line} =~ https://[^\ ]+ ]] - then - url_to_get="${BASH_REMATCH}" + url_to_get="${BASH_REMATCH}" + # If pbot is not present. + if grep no pbot_present + then the_title=$( curl -L --compressed "${url_to_get}" 2> /dev/null | while rdom @@ -163,7 +163,7 @@ EOF fi fi fi - + # TODO: add a birthday announcement feature, cointoss feature, timer # feature. -- cgit v1.2.3-54-g00ecf