From 9b776add4b73348db605dc988ba99f83d281cdbd Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 25 Aug 2013 20:02:27 -0300 Subject: Cleanup --- httracker | 4 ++-- scuttler | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/httracker b/httracker index 385035c..5967e4a 100755 --- a/httracker +++ b/httracker @@ -6,13 +6,13 @@ # Configuration source config || exit 1 -# Load functions +# Functions source lib/httracker/functions || exit 1 # Create folders mkdir -p $MIRRORS $TMP -# Get URL +# Get URLs from feed # Thanks http://stackoverflow.com/questions/443991/how-to-parse-rss-feeds-xml-in-a-shell-script curl -s "$FEED" | grep -o '[^<]*' | grep -o "[^>]*$" > $URLS diff --git a/scuttler b/scuttler index 0b2b6da..c02e992 100755 --- a/scuttler +++ b/scuttler @@ -6,20 +6,19 @@ # Configuration source config || exit 1 +# Functions +source lib/httracker/functions || exit 1 + # Other parameters BASEDIR=/var/sites/links SCUTTLEDIR=`basename $( find ${BASEDIR} -maxdepth 1 -iname "SemanticScuttle-*" | head -n 1 )` CONFIGFILE=${BASEDIR}/${SCUTTLEDIR}/data/config.php - -# Load functions -source lib/httracker/functions || exit 1 - dbuser=`httracker_scuttle_config dbuser` dbpass=`httracker_scuttle_config dbpass` dbname=`httracker_scuttle_config dbname` dbhost=`httracker_scuttle_config dbhost` -# Grab URLs from db +# Get URLs from database URLS=`mktemp -p ${TMP}` chown links.links ${URLS} chmod 600 ${URLS} -- cgit v1.2.3