]> gitweb.fluxo.info Git - httruta.git/commitdiff
Cleanup
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 25 Aug 2013 23:02:27 +0000 (20:02 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 25 Aug 2013 23:02:27 +0000 (20:02 -0300)
httracker
scuttler

index 385035c3bc9b596d0e15f4ed2eeded8ae55779e4..5967e4aabcd9598320dc9c9b541683b6e1d5837c 100755 (executable)
--- 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 '<link>[^<]*' | grep -o "[^>]*$" > $URLS
 
index 0b2b6dae356939df71779f78638530a17a1b4d05..c02e992f20cf5434a4e5caf982faf5c45b483cf9 100755 (executable)
--- 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}