diff options
author | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2016-01-11 14:17:41 +0200 |
---|---|---|
committer | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2016-01-11 14:17:41 +0200 |
commit | ecfb93704c94c20949127933f7e6c710c0b635d5 (patch) | |
tree | 60da3d61441a9e1fdb36e22c836c49dde25f40c8 | |
parent | ca57e3a4b236e0e4f3825747ae1bea45d4465aff (diff) |
analyse-logs.sh: Remove trailing whitespace.
Trailing whitespace is git warning.
Change-Id: Id151110478be69c5e34a198469d25c36f77b0ce8
-rwxr-xr-x | analyse-logs.sh | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/analyse-logs.sh b/analyse-logs.sh index b00f4e0..0b72b6b 100755 --- a/analyse-logs.sh +++ b/analyse-logs.sh @@ -29,7 +29,7 @@ STARTING_LOCATION=`pwd` # house keeping if [ -z "$WEB_NAME" ] || [ -z "$TRUE" ] ; then echo "WEB SITE NAME or other variables NOT SET" - echo "This script is not designed to be called directly" + echo "This script is not designed to be called directly" exit 1 fi @@ -54,15 +54,15 @@ if [ -z "$VISITORS" ] ; then VISITORS=$FALSE fi -# this allows an external script to set DEBUG, or if it's not set, +# this allows an external script to set DEBUG, or if it's not set, # then set it to false here so the script is run quietly if [ -z "$DEBUG" ] ; then DEBUG=$FALSE -fi +fi # do we want to extract file info and run the log analyzers on only that data -# quite handy for snapshots and releases .linaro.org so we get a better -# picture of what is downloaded. +# quite handy for snapshots and releases .linaro.org so we get a better +# picture of what is downloaded. # 1 = true, 0 = false if [ $WEB_NAME = "snapshots.linaro.org" ] || [ $WEB_NAME = "releases.linaro.org" ] || [ $WEB_NAME = "builds.96boards.org" ]; then EXTRACT_GZ_BZ2_FILES=$TRUE @@ -73,7 +73,7 @@ else fi # this allows an external script to set DO_GEOIP_LOOKUP or DO_REV_DNS_LOOKUP -# as desired but by default they are set to true so the log files have +# as desired but by default they are set to true so the log files have # as much data in them as possible. if [ -z "$DO_GEOIP_LOOKUP" ] ; then DO_GEOIP_LOOKUP=$TRUE @@ -215,7 +215,7 @@ write_config_files () if [ $WEBDRUID -eq $TRUE ] ; then write.conf.file $WORK_PATH/$WEBDRUID_CONF_FULL_NAME $OUTPUT_PATH/$WEBDRUID_FULL_PATH_NAME $PROCESSED_LOG_NAME if [ $DEBUG -eq $TRUE ] ; then - echo "write.webdruid.conf.full" + echo "write.webdruid.conf.full" fi if [ $EXTRACT_GZ_BZ2_FILES -eq $TRUE ] ; then write.conf.file $WORK_PATH/$WEBDRUID_CONF_FILTERED_NAME $OUTPUT_PATH/$WEBDRUID_FILTERED_PATH_NAME $FILTERED_LOG_NAME @@ -312,7 +312,7 @@ prep_directories () fi fi fi - + cd "$WORK_PATH" } @@ -347,7 +347,7 @@ cleanup () if [ $DEBUG -eq $TRUE ] ; then echo "rm -f $WORK_PATH/$AWFFULL_CONF_FULL_NAME" fi - + if [ $EXTRACT_GZ_BZ2_FILES -eq $TRUE ] ; then rm -f $WORK_PATH/$AWFFULL_CONF_FILTERED_NAME if [ $DEBUG -eq $TRUE ] ; then @@ -367,7 +367,7 @@ cleanup () if [ $DEBUG -eq $TRUE ] ; then echo "rm -f $WORK_PATH/$WEBALIZER_CONF_FULL_NAME" fi - + if [ $EXTRACT_GZ_BZ2_FILES -eq $TRUE ] ; then if [ -f "$WORK_PATH/$WEBALIZER_CONF_FILTERED_NAME" ] ; then rm -f $WORK_PATH/$WEBALIZER_CONF_FILTERED_NAME @@ -389,7 +389,7 @@ cleanup () if [ $DEBUG -eq $TRUE ] ; then echo "rm -f $WORK_PATH/$WEBDRUID_CONF_FULL_NAME" fi - + if [ $EXTRACT_GZ_BZ2_FILES -eq $TRUE ] ; then rm -f $WORK_PATH/$WEBDRUID_CONF_FILTERED_NAME if [ $DEBUG -eq $TRUE ] ; then @@ -402,7 +402,7 @@ cleanup () fi fi fi - fi + fi } extract_logs () @@ -424,15 +424,15 @@ extract_logs () else zcat $INPUT_PATH/preprocessed*access.log.gz > $WORK_PATH/$PROCESSED_LOG_NAME 2>/dev/null || true fi - + # make sure there is not an existing access.log file # Build a single log file that is not gzipped. # cat /dev/null > $WORK_PATH/$TMP_LOG_NAME # if [ $WEB_NAME = "www.linaro.org" ] ; then # This is becasue the logs were stored differently for part of the year # on www.linaro.org - # zcat the daily files that are stored by date access.log-yyyymmdd on to - # the tail of the new access.log file. + # zcat the daily files that are stored by date access.log-yyyymmdd on to + # the tail of the new access.log file. # x=`ls $INPUT_PATH/$PROCESSED_LOG_NAME-*.gz | wc -l` # if [ x > 0 ] ; then # zcat $INPUT_PATH/$PROCESSED_LOG_NAME-*.gz >> $WORK_PATH/$TMP_LOG_NAME @@ -456,7 +456,7 @@ extract_logs () if [ $DO_REV_DNS_LOOKUP -eq $TRUE ] || [ $DO_GEOIP_LOOKUP -eq $TRUE ] ; then # If it's www.linaro.org build the DNS database - # This is a tad risky as we could have differnt folks coming directly + # This is a tad risky as we could have differnt folks coming directly # into releases or snapshots then the main site, that said the risk is # low and the speedup huge so it's worth it. if [ $WEB_NAME = "www.linaro.org" ] ; then @@ -472,14 +472,14 @@ extract_logs () # Now translate ip addresses to DNS names for all log files if [ $DO_GEOIP_LOOKUP -eq $TRUE ] ; then - # if GEOIP LOOKUP is desired do both GEOIP and reverse DNS lookup at the sametime + # if GEOIP LOOKUP is desired do both GEOIP and reverse DNS lookup at the sametime # the iploc.py program was modified to read both databases and do both in one pass. if [ $DEBUG -eq $TRUE ] ; then echo "About to do GEOIP LOOKUP and dnshistory replace" fi python $STARTING_LOCATION/iploc.py --config=$STARTING_LOCATION/$CONFIG \ $WORK_PATH/$TMP_LOG_NAME >> $WORK_PATH/$PROCESSED_LOG_NAME - else + else # GEOIP info not requested so do the reverse DNS only if [ $DEBUG -eq $TRUE ] ; then echo "About to do dnshistory replace only" @@ -492,7 +492,7 @@ extract_logs () fi cat $WORK_PATH/$TMP_LOG_NAME >> $WORK_PATH/$PROCESSED_LOG_NAME fi - + # now make a new file with only .gz, bz2, xz,exe, and zip files downloaded # this grep can take some time to run, it's using a regular expression to extract compressed files if [ $EXTRACT_GZ_BZ2_FILES -eq $TRUE ] ; then @@ -516,8 +516,8 @@ extract_logs () echo "creating toochain log" fi cat $WORK_PATH/$FILTERED_LOG_NAME | grep -E '\<*gcc-linaro' > $WORK_PATH/$TOOLCHAIN_LOG_NAME - fi - fi + fi + fi } process_logs () @@ -629,11 +629,11 @@ process_logs () } -# OK, the actual section to do work, prep, write out config files as needed, +# OK, the actual section to do work, prep, write out config files as needed, # extract log files, process the log files, cleanup and exit. # verify and make if necessary all directories needed by this script -prep_directories +prep_directories cleanup # write out the config files, rememnber they are changed here in this file |