2012-08-23 00:13:10 +12:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
2012-09-06 12:20:12 +12:00
|
|
|
# Fanboy Adblock list grabber script v2.13 (06/09/2012)
|
2012-08-23 00:13:10 +12:00
|
|
|
# Dual License CCby3.0/GPLv2
|
|
|
|
# http://creativecommons.org/licenses/by/3.0/
|
|
|
|
# http://www.gnu.org/licenses/gpl-2.0.html
|
|
|
|
#
|
|
|
|
# Version history
|
|
|
|
#
|
2012-09-07 12:24:07 +12:00
|
|
|
# 2.14 More error Checking of Ramdisks, removal of seperate IE ramdisk
|
2012-09-06 12:20:12 +12:00
|
|
|
# 2.13 Allow mirrors to use non-ram disk for HG
|
2012-09-05 23:13:07 +12:00
|
|
|
# 2.12 Annoyance List split list (beta)
|
2012-08-29 19:08:22 +12:00
|
|
|
# 2.11 Added Non-element and Fanboy-Adult
|
2012-08-27 19:30:49 +12:00
|
|
|
# 2.10 Tracking List split list
|
2012-08-26 12:41:46 +12:00
|
|
|
# 2.06 Better error checking
|
2012-08-25 17:28:16 +12:00
|
|
|
# 2.05 Remove Dube loops and create error checking.
|
2012-08-24 20:47:28 +12:00
|
|
|
# 2.04 Remove any empty lines
|
2012-08-24 19:13:28 +12:00
|
|
|
# 2.03 Allow Hg pulls
|
2012-08-24 18:40:24 +12:00
|
|
|
# 2.02 Typo in fanboy-elements-specific.txt
|
2012-08-23 23:48:14 +12:00
|
|
|
# 2.01 Various cleanups, add Israeli List
|
2012-08-23 00:13:10 +12:00
|
|
|
# 2.00 Re-write the script to support split files
|
|
|
|
# 1.82 Better checking of scripts being loaded
|
|
|
|
# 1.81 Misc Cleanups
|
|
|
|
# 1.8 Allow list to be stored in ramdisk
|
|
|
|
# 1.752 Declare global variables
|
|
|
|
# 1.751 Remove Shred, and cleanup variable names
|
|
|
|
# 1.75 Store log in ramdisk to avoid unnessary writes (Currently disabled)
|
|
|
|
# 1.74 Store repo in ramdisk to avoid unnessary writes (Currently disabled)
|
|
|
|
#
|
|
|
|
# Variables for directorys
|
|
|
|
#
|
|
|
|
|
|
|
|
export ZIP="nice -n 19 /usr/local/bin/7za a -mx=9 -y -tgzip"
|
|
|
|
export NICE="nice -n 19"
|
|
|
|
export TAC="/usr/bin/tac"
|
|
|
|
export CAT="/bin/cat"
|
|
|
|
export MAINDIR="/tmp/Ramdisk/www/adblock"
|
|
|
|
export SPLITDIR="/tmp/Ramdisk/www/adblock/split/test"
|
|
|
|
export HGSERV="/tmp/hgstuff/fanboy-adblock-list"
|
|
|
|
export TESTDIR="/tmp/work"
|
2012-08-25 17:28:16 +12:00
|
|
|
export DATE="`date`"
|
2012-08-23 00:13:10 +12:00
|
|
|
export ADDCHECKSUM="nice -n 19 perl $HGSERV/scripts/addChecksum.pl"
|
|
|
|
export LOGFILE="/etc/crons/log.txt"
|
|
|
|
export HG="/usr/local/bin/hg"
|
|
|
|
export SHA256SUM="/usr/bin/sha256sum"
|
2012-08-25 17:28:16 +12:00
|
|
|
export TWIDGE="/usr/bin/twidge update"
|
2012-09-07 12:24:07 +12:00
|
|
|
export IEDIR="/tmp/work/ie"
|
|
|
|
export IESUBS="/tmp/work/ie/subscriptions"
|
2012-08-23 00:13:10 +12:00
|
|
|
export IRONDIR="/tmp/Ramdisk/www/adblock/iron"
|
|
|
|
|
|
|
|
# Test for Ram disks
|
|
|
|
#
|
|
|
|
if [ ! -d "/tmp/work/" ]; then
|
|
|
|
rm -rf /tmp/work/
|
|
|
|
mkdir /tmp/work; chmod 777 /tmp/work
|
|
|
|
mount -t tmpfs -o size=50M tmpfs /tmp/work/
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "/tmp/work/opera" ]; then
|
|
|
|
mkdir /tmp/work/opera; chmod 777 /tmp/work/opera
|
|
|
|
mkdir /tmp/work/opera/test; chmod 777 /tmp/work/opera/test
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "/tmp/work/opera/test" ]; then
|
|
|
|
mkdir /tmp/work/opera/test; chmod 777 /tmp/work/opera/test
|
|
|
|
fi
|
|
|
|
|
2012-09-07 12:24:07 +12:00
|
|
|
if [ ! -d "/tmp/Ramdisk/" ]; then
|
|
|
|
rm -rf /tmp/Ramdisk/
|
|
|
|
mkdir /tmp/Ramdisk; chmod 777 /tmp/Ramdisk
|
|
|
|
mount -t tmpfs -o size=110M tmpfs /tmp/Ramdisk/
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 12:24:07 +12:00
|
|
|
#if [ ! -d "/tmp/ieramdisk/subscriptions" ]; then
|
|
|
|
# rm -rf /tmp/ieramdisk/subscriptions
|
|
|
|
# mkdir /tmp/ieramdisk; chmod 777 /tmp/ieramdisk
|
|
|
|
# mount -t tmpfs -o size=30M tmpfs /tmp/ieramdisk
|
|
|
|
# mkdir /tmp/ieramdisk/subscriptions; chmod 777 /tmp/ieramdisk/subscriptions
|
|
|
|
#fi
|
|
|
|
|
2012-08-23 00:13:10 +12:00
|
|
|
if [ ! -d "/tmp/Ramdisk/www/adblock/split" ]; then
|
|
|
|
mkdir /tmp/Ramdisk/www/adblock/split; chmod 777 /tmp/Ramdisk/www/adblock/split
|
|
|
|
fi
|
|
|
|
|
2012-09-06 13:55:43 +12:00
|
|
|
# Check mirror dir exists and its not a symlink
|
2012-09-06 12:20:12 +12:00
|
|
|
#
|
2012-09-06 13:55:43 +12:00
|
|
|
if [ -d "/var/hgstuff/fanboy-adblock-list" ] && [ -h "/tmp/hgstuff" ]; then
|
|
|
|
export HGSERV="/var/hgstuff/fanboy-adblock-list"
|
2012-09-07 13:51:54 +12:00
|
|
|
echo "HGSERV=/var/hgstuff/fanboy-adblock-list"
|
2012-09-06 13:55:43 +12:00
|
|
|
cd /tmp/hgstuff/fanboy-adblock-list
|
|
|
|
$NICE $HG pull
|
|
|
|
$NICE $HG update
|
|
|
|
else
|
|
|
|
# If not, its stored here
|
|
|
|
export HGSERV="/tmp/hgstuff/fanboy-adblock-list"
|
2012-09-07 13:51:54 +12:00
|
|
|
echo "HGSERV=/tmp/hgstuff/fanboy-adblock-list"
|
2012-09-06 13:55:43 +12:00
|
|
|
cd /tmp/hgstuff/fanboy-adblock-list
|
|
|
|
$NICE $HG pull
|
|
|
|
$NICE $HG update
|
2012-09-06 12:20:12 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-generic.txt #######################################
|
2012-08-23 00:13:10 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-generic.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-generic.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-generic.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
# Clean up
|
|
|
|
#
|
2012-08-24 20:47:28 +12:00
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt > /dev/null
|
2012-08-23 00:13:10 +12:00
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-generic.txt $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-popups.txt $HGSERV/fanboy-adblock/fanboy-whitelist.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt \
|
2012-08-24 18:57:37 +12:00
|
|
|
$HGSERV/fanboy-adblock/fanboy-elements-generic.txt $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt > $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
|
2012-08-25 17:28:16 +12:00
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
2012-08-26 12:41:46 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-generic.txt $MAINDIR/split/fanboy-generic.txt
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
# Compress
|
|
|
|
#
|
2012-08-27 18:49:13 +12:00
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-adblock.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-adblock.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-adblock.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 19:08:22 +12:00
|
|
|
|
|
|
|
# Fanboy-non-element
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/firefox/fanboy-noele.sh
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-generic.txt - $DATE" >> $LOGFILE
|
2012-08-25 17:28:16 +12:00
|
|
|
fi
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
2012-08-23 00:13:10 +12:00
|
|
|
echo "Files are the same: fanboy-generic.txt" > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-generic (fanboy-generic.txt) failed to update: $DATE" >> $LOGFILE
|
2012-08-23 00:13:10 +12:00
|
|
|
# twidge update "fanboy-generic.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-thirdparty.txt #######################################
|
2012-08-23 00:13:10 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-thirdparty.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-thirdparty.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-thirdparty.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 23:48:14 +12:00
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-generic.txt $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-popups.txt $HGSERV/fanboy-adblock/fanboy-whitelist.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt \
|
2012-08-24 18:57:37 +12:00
|
|
|
$HGSERV/fanboy-adblock/fanboy-elements-generic.txt $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt > $TESTDIR/fanboy-merged.txt
|
2012-08-25 17:28:16 +12:00
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
2012-08-26 12:41:46 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $MAINDIR/split/fanboy-thirdparty.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-adblock.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-adblock.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-adblock.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 19:08:22 +12:00
|
|
|
|
|
|
|
# Fanboy-non-element
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/firefox/fanboy-noele.sh
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-thirdparty.txt - $DATE" >> $LOGFILE
|
2012-08-25 17:28:16 +12:00
|
|
|
fi
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
2012-08-23 00:13:10 +12:00
|
|
|
echo "Files are the same: fanboy-thirdparty.txt" > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-generic (fanboy-thirdparty.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-generic.txt failed to update: $DATE"
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-firstparty.txt #######################################
|
2012-08-23 00:13:10 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-firstparty.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-firstparty.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-firstparty.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 23:48:14 +12:00
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-generic.txt $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-popups.txt $HGSERV/fanboy-adblock/fanboy-whitelist.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt \
|
2012-08-24 18:57:37 +12:00
|
|
|
$HGSERV/fanboy-adblock/fanboy-elements-generic.txt $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt > $TESTDIR/fanboy-merged.txt
|
2012-08-25 17:28:16 +12:00
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
2012-08-26 12:41:46 +12:00
|
|
|
|
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-firstparty.txt $MAINDIR/split/fanboy-firstparty.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-adblock.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-adblock.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-adblock.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 19:08:22 +12:00
|
|
|
|
|
|
|
# Fanboy-non-element
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/firefox/fanboy-noele.sh
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-firstparty.txt - $DATE" >> $LOGFILE
|
2012-08-25 17:28:16 +12:00
|
|
|
fi
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
2012-08-23 00:13:10 +12:00
|
|
|
echo "Files are the same: fanboy-firstparty.txt" > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-generic (fanboy-firstparty.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-generic.txt failed to update: $DATE"
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-popups.txt #######################################
|
2012-08-23 00:13:10 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-popups.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-popups.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-popups.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 23:48:14 +12:00
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-generic.txt $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-popups.txt $HGSERV/fanboy-adblock/fanboy-whitelist.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt \
|
2012-08-24 18:57:37 +12:00
|
|
|
$HGSERV/fanboy-adblock/fanboy-elements-generic.txt $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt > $TESTDIR/fanboy-merged.txt
|
2012-08-25 17:28:16 +12:00
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
2012-08-26 12:41:46 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-popups.txt $MAINDIR/split/fanboy-popups.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-adblock.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-adblock.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-adblock.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 19:08:22 +12:00
|
|
|
|
|
|
|
# Fanboy-non-element
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/firefox/fanboy-noele.sh
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-popups.txt - $DATE" >> $LOGFILE
|
2012-08-25 17:28:16 +12:00
|
|
|
fi
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
2012-08-23 00:13:10 +12:00
|
|
|
echo "Files are the same: fanboy-popups.txt" > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-generic (fanboy-popups.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-generic.txt failed to update: $DATE"
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-whitelist.txt #######################################
|
2012-08-23 00:13:10 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-whitelist.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-whitelist.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-whitelist.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 23:48:14 +12:00
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-generic.txt $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-popups.txt $HGSERV/fanboy-adblock/fanboy-whitelist.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt \
|
2012-08-24 18:57:37 +12:00
|
|
|
$HGSERV/fanboy-adblock/fanboy-elements-generic.txt $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt > $TESTDIR/fanboy-merged.txt
|
2012-08-25 17:28:16 +12:00
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
2012-08-26 12:41:46 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-whitelist.txt $MAINDIR/split/fanboy-whitelist.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-adblock.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-adblock.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-adblock.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 19:08:22 +12:00
|
|
|
|
|
|
|
# Fanboy-non-element
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/firefox/fanboy-noele.sh
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-whitelist.txt - $DATE" >> $LOGFILE
|
2012-08-25 17:28:16 +12:00
|
|
|
fi
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
2012-08-23 00:13:10 +12:00
|
|
|
echo "Files are the same: fanboy-whitelist.txt" > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-generic (fanboy-whitelist.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-generic.txt failed to update: $DATE"
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-dimensions.txt #######################################
|
2012-08-23 00:13:10 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-dimensions.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-dimensions.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-dimensions.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 23:48:14 +12:00
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-generic.txt $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-popups.txt $HGSERV/fanboy-adblock/fanboy-whitelist.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt \
|
2012-08-24 18:57:37 +12:00
|
|
|
$HGSERV/fanboy-adblock/fanboy-elements-generic.txt $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt > $TESTDIR/fanboy-merged.txt
|
2012-08-25 17:28:16 +12:00
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
2012-08-26 12:41:46 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-dimensions.txt $MAINDIR/split/fanboy-dimensions.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-adblock.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-adblock.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-adblock.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 19:08:22 +12:00
|
|
|
|
|
|
|
# Fanboy-non-element
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/firefox/fanboy-noele.sh
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-dimensions.txt - $DATE" >> $LOGFILE
|
2012-08-25 17:28:16 +12:00
|
|
|
fi
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
2012-08-23 00:13:10 +12:00
|
|
|
echo "Files are the same: fanboy-dimensions.txt" > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-generic (fanboy-dimensions.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-generic.txt failed to update: $DATE"
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-dimensions-whitelist.txt #######################################
|
2012-08-23 00:13:10 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-dimensions-whitelist.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 23:48:14 +12:00
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-generic.txt $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-popups.txt $HGSERV/fanboy-adblock/fanboy-whitelist.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt \
|
2012-08-24 18:57:37 +12:00
|
|
|
$HGSERV/fanboy-adblock/fanboy-elements-generic.txt $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt > $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
|
2012-08-25 17:28:16 +12:00
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
2012-08-26 12:41:46 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $MAINDIR/split/fanboy-dimensions-whitelist.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-adblock.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-adblock.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-adblock.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 19:08:22 +12:00
|
|
|
|
|
|
|
# Fanboy-non-element
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/firefox/fanboy-noele.sh
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-dimensions-whitelist.txt - $DATE" >> $LOGFILE
|
2012-08-25 17:28:16 +12:00
|
|
|
fi
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
2012-08-23 00:13:10 +12:00
|
|
|
echo "Files are the same: fanboy-dimensions-whitelist.txt" > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-generic (fanboy-dimensions-whitelist.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-generic.txt failed to update: $DATE"
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-adult-generic.txt #######################################
|
2012-08-23 00:13:10 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-adult-generic.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-adult-generic.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-adult-generic.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 23:48:14 +12:00
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-generic.txt $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-popups.txt $HGSERV/fanboy-adblock/fanboy-whitelist.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt \
|
2012-08-24 18:57:37 +12:00
|
|
|
$HGSERV/fanboy-adblock/fanboy-elements-generic.txt $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt > $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
|
2012-08-25 17:28:16 +12:00
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
2012-08-26 12:41:46 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $MAINDIR/split/fanboy-adult-generic.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-adblock.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-adblock.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-adblock.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 17:58:23 +12:00
|
|
|
|
|
|
|
# Fanboy-Adult
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/firefox/fanboy-adult.sh
|
2012-08-29 19:08:22 +12:00
|
|
|
|
|
|
|
# Fanboy-non-element
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/firefox/fanboy-noele.sh
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-adult-generic.txt - $DATE" >> $LOGFILE
|
2012-08-25 17:28:16 +12:00
|
|
|
fi
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
2012-08-23 00:13:10 +12:00
|
|
|
echo "Files are the same: fanboy-adult-generic.txt" > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-generic (fanboy-adult-generic.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-generic.txt failed to update: $DATE"
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-adult-firstparty.txt #######################################
|
2012-08-23 00:13:10 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-adult-firstparty.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 23:48:14 +12:00
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-generic.txt $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-popups.txt $HGSERV/fanboy-adblock/fanboy-whitelist.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt \
|
2012-08-24 18:57:37 +12:00
|
|
|
$HGSERV/fanboy-adblock/fanboy-elements-generic.txt $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt > $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
|
2012-08-25 17:28:16 +12:00
|
|
|
# Make sure the file exists
|
2012-08-23 00:13:10 +12:00
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
2012-08-26 12:41:46 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt $MAINDIR/split/fanboy-adult-firstparty.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-adblock.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-adblock.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-adblock.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 17:58:23 +12:00
|
|
|
|
|
|
|
# Fanboy-Adult
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/firefox/fanboy-adult.sh
|
2012-08-29 19:08:22 +12:00
|
|
|
|
|
|
|
# Fanboy-non-element
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/firefox/fanboy-noele.sh
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-adult-firstparty.txt - $DATE" >> $LOGFILE
|
2012-08-25 17:28:16 +12:00
|
|
|
fi
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
2012-08-23 00:13:10 +12:00
|
|
|
echo "Files are the same: fanboy-adult-firstparty.txt" > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-generic (fanboy-adult-firstparty.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-generic.txt failed to update: $DATE"
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-adult-thirdparty.txt #######################################
|
2012-08-23 00:13:10 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-adult-thirdparty.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 23:48:14 +12:00
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-generic.txt $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-popups.txt $HGSERV/fanboy-adblock/fanboy-whitelist.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt \
|
2012-08-24 18:57:37 +12:00
|
|
|
$HGSERV/fanboy-adblock/fanboy-elements-generic.txt $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt > $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
|
2012-08-25 17:28:16 +12:00
|
|
|
# Make sure the file exists
|
2012-08-23 00:13:10 +12:00
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
2012-08-26 12:41:46 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $MAINDIR/split/fanboy-adult-thirdparty.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-adblock.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-adblock.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-adblock.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 17:58:23 +12:00
|
|
|
|
|
|
|
# Fanboy-Adult
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/firefox/fanboy-adult.sh
|
2012-08-29 19:08:22 +12:00
|
|
|
|
|
|
|
# Fanboy-non-element
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/firefox/fanboy-noele.sh
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-adult-thirdparty.txt - $DATE" >> $LOGFILE
|
2012-08-25 17:28:16 +12:00
|
|
|
fi
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
2012-08-23 00:13:10 +12:00
|
|
|
echo "Files are the same: fanboy-adult-thirdparty.txt" > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-generic (fanboy-adult-thirdparty.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-generic.txt failed to update: $DATE"
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-adult-elements.txt #######################################
|
2012-08-23 00:13:10 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-adult-elements.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-adult-elements.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-adult-elements.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 23:48:14 +12:00
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-generic.txt $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-popups.txt $HGSERV/fanboy-adblock/fanboy-whitelist.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt \
|
2012-08-24 18:57:37 +12:00
|
|
|
$HGSERV/fanboy-adblock/fanboy-elements-generic.txt $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt > $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
|
2012-08-25 17:28:16 +12:00
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
2012-08-26 12:41:46 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $MAINDIR/split/fanboy-adult-elements.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-adblock.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-adblock.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-adblock.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 17:58:23 +12:00
|
|
|
|
|
|
|
# Fanboy-Adult
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/firefox/fanboy-adult.sh
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-adult-elements.txt - $DATE" >> $LOGFILE
|
2012-08-25 17:28:16 +12:00
|
|
|
fi
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
2012-08-23 00:13:10 +12:00
|
|
|
echo "Files are the same: fanboy-adult-elements.txt" > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-generic (fanboy-adult-elements.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-generic.txt failed to update: $DATE"
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-adult-whitelists.txt #######################################
|
2012-08-23 00:13:10 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-adult-whitelists.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 23:48:14 +12:00
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-generic.txt $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-popups.txt $HGSERV/fanboy-adblock/fanboy-whitelist.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt \
|
2012-08-24 18:57:37 +12:00
|
|
|
$HGSERV/fanboy-adblock/fanboy-elements-generic.txt $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt > $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
|
2012-08-25 17:28:16 +12:00
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
2012-08-26 12:41:46 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt $MAINDIR/split/fanboy-adult-whitelists.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-adblock.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-adblock.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-adblock.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 17:58:23 +12:00
|
|
|
|
|
|
|
# Fanboy-Adult
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/firefox/fanboy-adult.sh
|
2012-08-29 19:08:22 +12:00
|
|
|
|
|
|
|
# Fanboy-non-element
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/firefox/fanboy-noele.sh
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-adult-whitelists.txt - $DATE" >> $LOGFILE
|
2012-08-25 17:28:16 +12:00
|
|
|
fi
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
2012-08-23 00:13:10 +12:00
|
|
|
echo "Files are the same: fanboy-adult-whitelists.txt" > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-generic (fanboy-adult-whitelists.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-generic.txt failed to update: $DATE"
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-p2p-firstparty.txt #######################################
|
2012-08-23 00:13:10 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-p2p-firstparty.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 23:48:14 +12:00
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-generic.txt $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-popups.txt $HGSERV/fanboy-adblock/fanboy-whitelist.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt \
|
2012-08-24 18:57:37 +12:00
|
|
|
$HGSERV/fanboy-adblock/fanboy-elements-generic.txt $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt > $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
|
2012-08-25 17:28:16 +12:00
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
2012-08-26 12:41:46 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $MAINDIR/split/fanboy-p2p-firstparty.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-adblock.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-adblock.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-adblock.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 19:08:22 +12:00
|
|
|
|
|
|
|
# Fanboy-non-element
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/firefox/fanboy-noele.sh
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-p2p-firstparty.txt - $DATE" >> $LOGFILE
|
2012-08-25 17:28:16 +12:00
|
|
|
fi
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
2012-08-23 00:13:10 +12:00
|
|
|
echo "Files are the same: fanboy-p2p-firstparty.txt" > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-generic (fanboy-p2p-firstparty.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-generic.txt failed to update: $DATE"
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-p2p-thirdparty.txt #######################################
|
2012-08-23 00:13:10 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-p2p-thirdparty.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 23:48:14 +12:00
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-generic.txt $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-popups.txt $HGSERV/fanboy-adblock/fanboy-whitelist.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt \
|
2012-08-24 18:57:37 +12:00
|
|
|
$HGSERV/fanboy-adblock/fanboy-elements-generic.txt $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt > $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
|
2012-08-25 17:28:16 +12:00
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
2012-08-26 12:41:46 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $MAINDIR/split/fanboy-p2p-thirdparty.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-adblock.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-adblock.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-adblock.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 19:08:22 +12:00
|
|
|
|
|
|
|
# Fanboy-non-element
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/firefox/fanboy-noele.sh
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-p2p-thirdparty.txt - $DATE" >> $LOGFILE
|
2012-08-25 17:28:16 +12:00
|
|
|
fi
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
2012-08-23 00:13:10 +12:00
|
|
|
echo "Files are the same: fanboy-p2p-thirdparty.txt" > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-generic (fanboy-p2p-thirdparty.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-generic.txt failed to update: $DATE"
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
|
|
|
|
####################################### fanboy-p2p-elements.txt #######################################
|
2012-08-23 00:13:10 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-p2p-elements.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-p2p-elements.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 23:48:14 +12:00
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-generic.txt $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-popups.txt $HGSERV/fanboy-adblock/fanboy-whitelist.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt \
|
2012-08-24 18:57:37 +12:00
|
|
|
$HGSERV/fanboy-adblock/fanboy-elements-generic.txt $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt > $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
|
2012-08-25 17:28:16 +12:00
|
|
|
# Make sure the file exists
|
2012-08-24 20:47:28 +12:00
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
2012-08-26 12:41:46 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt $MAINDIR/split/fanboy-p2p-elements.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-adblock.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-adblock.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-adblock.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-p2p-elements.txt - $DATE" >> $LOGFILE
|
2012-08-25 17:28:16 +12:00
|
|
|
fi
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
2012-08-23 00:13:10 +12:00
|
|
|
echo "Files are the same: fanboy-p2p-elements.txt" > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-generic (fanboy-p2p-elements.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-generic.txt failed to update: $DATE"
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-dimensions.txt #######################################
|
2012-09-07 19:22:41 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-dimensions.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-dimensions.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-dimensions.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt > $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-dimensions.txt $MAINDIR/split/fanboy-dimensions.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Dimension Header
|
|
|
|
#
|
|
|
|
sed -i 's/Adblock\ List/Fanboy\ Dimension\ List/g' $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-dimensions.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-dimensions.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-dimensions.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-dimensions.txt: fanboy-dimensions.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-dimensions.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-p2p (fanboy-dimensions.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-p2p-firstparty.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-dimensions-whitelist.txt #######################################
|
2012-09-07 19:22:41 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-dimensions-whitelist.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt > $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $MAINDIR/split/fanboy-dimensions-whitelist.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Dimension Header
|
|
|
|
#
|
|
|
|
sed -i 's/Adblock\ List/Fanboy\ Dimension\ List/g' $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-dimensions.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-dimensions.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-dimensions.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-dimensions-whitelist.txt: fanboy-dimensions-whitelist.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-dimensions-whitelist.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-p2p (fanboy-dimensions-whitelist.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-p2p-firstparty.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-elements-generic.txt #######################################
|
2012-08-23 00:13:10 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-elements-generic.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-elements-generic.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-elements-generic.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 23:48:14 +12:00
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-generic.txt $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-popups.txt $HGSERV/fanboy-adblock/fanboy-whitelist.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt \
|
2012-08-24 18:57:37 +12:00
|
|
|
$HGSERV/fanboy-adblock/fanboy-elements-generic.txt $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt > $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
|
2012-08-25 17:28:16 +12:00
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
2012-08-26 12:41:46 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-elements-generic.txt $MAINDIR/split/fanboy-elements-generic.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-adblock.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-adblock.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-adblock.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-elements-generic.txt - $DATE" >> $LOGFILE
|
2012-08-25 17:28:16 +12:00
|
|
|
fi
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
2012-08-23 00:13:10 +12:00
|
|
|
echo "Files are the same: fanboy-elements-generic.txt" > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-generic (fanboy-elements-generic.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-generic.txt failed to update: $DATE"
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-elements-specific.txt #######################################
|
2012-08-23 00:13:10 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
2012-08-24 18:40:24 +12:00
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-elements-specific.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
2012-08-23 00:13:10 +12:00
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
2012-08-24 18:40:24 +12:00
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-elements-specific.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-elements-specific.txt | cut -d' ' -f1)
|
2012-08-23 00:13:10 +12:00
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 23:48:14 +12:00
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-generic.txt $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-popups.txt $HGSERV/fanboy-adblock/fanboy-whitelist.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt \
|
2012-08-24 18:57:37 +12:00
|
|
|
$HGSERV/fanboy-adblock/fanboy-elements-generic.txt $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt > $TESTDIR/fanboy-merged.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
|
2012-08-25 17:28:16 +12:00
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
2012-08-26 12:41:46 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $MAINDIR/split/fanboy-elements-specific.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-adblock.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-adblock.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-adblock.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-elements-specific.txt - $DATE" >> $LOGFILE
|
2012-08-25 17:28:16 +12:00
|
|
|
fi
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
2012-08-23 00:13:10 +12:00
|
|
|
echo "Files are the same: fanboy-elements-specific.txt" > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-generic (fanboy-elements-specific.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-generic.txt failed to update: $DATE"
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-elements-exceptions.txt #######################################
|
2012-08-24 18:57:37 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-elements-exceptions.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-generic.txt $HGSERV/fanboy-adblock/fanboy-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-popups.txt $HGSERV/fanboy-adblock/fanboy-whitelist.txt $HGSERV/fanboy-adblock/fanboy-dimensions.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-dimensions-whitelist.txt $HGSERV/fanboy-adblock/fanboy-adult-generic.txt $HGSERV/fanboy-adblock/fanboy-adult-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-adult-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-adult-elements.txt $HGSERV/fanboy-adblock/fanboy-adult-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-elements-generic.txt $HGSERV/fanboy-adblock/fanboy-elements-specific.txt $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt > $TESTDIR/fanboy-merged.txt
|
|
|
|
|
2012-08-25 17:28:16 +12:00
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
2012-08-26 12:41:46 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-elements-exceptions.txt $MAINDIR/split/fanboy-elements-exceptions.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-adblock.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-adblock.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-adblock.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-elements-exceptions.txt - $DATE" >> $LOGFILE
|
2012-08-25 17:28:16 +12:00
|
|
|
fi
|
2012-08-26 12:41:46 +12:00
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
2012-08-24 18:57:37 +12:00
|
|
|
echo "Files are the same: fanboy-elements-exceptions.txt" > /dev/null
|
2012-08-26 12:41:46 +12:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-generic (fanboy-elements-exceptions.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-generic.txt failed to update: $DATE"
|
2012-08-24 18:57:37 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-p2p-firstparty.txt #######################################
|
2012-09-07 19:14:44 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-p2p-firstparty.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt > $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt $MAINDIR/split/fanboy-p2p-firstparty.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# P2P Header
|
|
|
|
#
|
|
|
|
sed -i 's/Adblock\ List/Fanboy\ P2P\ List/g' $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-p2p.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-p2p.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-p2p.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-p2p-firstparty.txt: fanboy-p2p-firstparty.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-p2p-firstparty.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-p2p (fanboy-p2p-firstparty.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-p2p-firstparty.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-p2p-thirdparty.txt #######################################
|
2012-09-07 19:14:44 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-p2p-thirdparty.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt > $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $MAINDIR/split/fanboy-p2p-thirdparty.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# P2P Header
|
|
|
|
#
|
|
|
|
sed -i 's/Adblock\ List/Fanboy\ P2P\ List/g' $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-p2p.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-p2p.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-p2p.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-merged.txt: fanboy-p2p-thirdparty.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-p2p-thirdparty.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-p2p (fanboy-p2p-thirdparty.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-p2p-thirdparty.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-p2p-elements.txt #######################################
|
2012-09-07 19:14:44 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-adblock/fanboy-p2p-elements.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-p2p-elements.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
rm -rf $TESTDIR/fanboy-merged.txt
|
|
|
|
$CAT $HGSERV/fanboy-adblock/fanboy-header.txt $HGSERV/fanboy-adblock/fanboy-p2p-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-adblock/fanboy-p2p-thirdparty.txt $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt > $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
|
|
|
if [ -s "$TESTDIR/fanboy-merged.txt" ]; then
|
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-adblock/fanboy-p2p-elements.txt $MAINDIR/split/fanboy-p2p-elements.txt
|
|
|
|
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-merged.txt > $TESTDIR/fanboy-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-merged2.txt $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# P2P Header
|
|
|
|
#
|
|
|
|
sed -i 's/Adblock\ List/Fanboy\ P2P\ List/g' $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-merged.txt
|
|
|
|
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-merged.txt $MAINDIR/fanboy-p2p.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-p2p.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-p2p.txt.gz $TESTDIR/fanboy-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-p2p-elements.txt: fanboy-p2p-elements.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-p2p-elements.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-p2p (fanboy-p2p-elements.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-p2p-elements.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-tracking-generic.txt #######################################
|
2012-08-27 19:30:49 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-tracking/fanboy-tracking-generic.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-tracking/fanboy-tracking-generic.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-tracking-generic.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
# Clean up
|
|
|
|
#
|
|
|
|
rm -rf $TESTDIR/fanboy-tracking-merged.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-tracking/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-generic.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-adult.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-general.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-nonenglish.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-whitelist.txt > $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-tracking-merged.txt" ]; then
|
2012-08-27 19:30:49 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-tracking/fanboy-tracking-generic.txt $MAINDIR/split/fanboy-tracking-generic.txt
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-tracking-merged.txt > $TESTDIR/fanboy-tracking-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-tracking-merged2.txt $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-tracking-merged.txt $MAINDIR/fanboy-tracking.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-tracking.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-tracking.txt.gz $TESTDIR/fanboy-tracking-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 22:47:37 +12:00
|
|
|
|
|
|
|
# IE: Fanboy-Tracking
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/ie/tracking-ie-generator.sh
|
2012-08-27 19:30:49 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-tracking-merged.txt: fanboy-tracking-generic.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-tracking-generic.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-tracking-merged.txt (fanboy-tracking-generic.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-tracking-generic.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-tracking-firstparty.txt #######################################
|
2012-08-27 19:30:49 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-tracking/fanboy-tracking-firstparty.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-tracking/fanboy-tracking-firstparty.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-tracking-firstparty.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
# Clean up
|
|
|
|
#
|
|
|
|
rm -rf $TESTDIR/fanboy-tracking-merged.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-tracking/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-generic.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-adult.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-general.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-nonenglish.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-whitelist.txt > $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-tracking-merged.txt" ]; then
|
2012-08-27 19:30:49 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-tracking/fanboy-tracking-firstparty.txt $MAINDIR/split/fanboy-tracking-firstparty.txt
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-tracking-merged.txt > $TESTDIR/fanboy-tracking-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-tracking-merged2.txt $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-tracking-merged.txt $MAINDIR/fanboy-tracking.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-tracking.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-tracking.txt.gz $TESTDIR/fanboy-tracking-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 22:47:37 +12:00
|
|
|
|
|
|
|
# IE: Fanboy-Tracking
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/ie/tracking-ie-generator.sh
|
2012-08-27 19:30:49 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-tracking-merged.txt: fanboy-tracking-firstparty.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-tracking-firstparty.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-tracking-merged.txt (fanboy-tracking-firstparty.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-tracking-firstparty.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-tracking-thirdparty.txt #######################################
|
2012-08-27 19:30:49 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-tracking/fanboy-tracking-thirdparty.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-tracking/fanboy-tracking-thirdparty.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-tracking-thirdparty.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
# Clean up
|
|
|
|
#
|
|
|
|
rm -rf $TESTDIR/fanboy-tracking-merged.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-tracking/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-generic.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-adult.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-general.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-nonenglish.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-whitelist.txt > $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-tracking-merged.txt" ]; then
|
2012-08-27 19:30:49 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-tracking/fanboy-tracking-thirdparty.txt $MAINDIR/split/fanboy-tracking-thirdparty.txt
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-tracking-merged.txt > $TESTDIR/fanboy-tracking-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-tracking-merged2.txt $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-tracking-merged.txt $MAINDIR/fanboy-tracking.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-tracking.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-tracking.txt.gz $TESTDIR/fanboy-tracking-merged.txt > /dev/null
|
2012-08-24 18:57:37 +12:00
|
|
|
|
2012-08-27 19:30:49 +12:00
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 22:47:37 +12:00
|
|
|
|
|
|
|
# IE: Fanboy-Tracking
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/ie/tracking-ie-generator.sh
|
2012-08-27 19:30:49 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-tracking-merged.txt: fanboy-tracking-thirdparty.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-tracking-thirdparty.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-tracking-merged.txt (fanboy-tracking-thirdparty.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-tracking-thirdparty.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-tracking-general.txt #######################################
|
2012-08-27 19:30:49 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-tracking/fanboy-tracking-general.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-tracking/fanboy-tracking-general.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-tracking-general.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
# Clean up
|
|
|
|
#
|
|
|
|
rm -rf $TESTDIR/fanboy-tracking-merged.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-tracking/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-generic.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-adult.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-general.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-nonenglish.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-whitelist.txt > $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-tracking-merged.txt" ]; then
|
2012-08-27 19:30:49 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-tracking/fanboy-tracking-general.txt $MAINDIR/split/fanboy-tracking-general.txt
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-tracking-merged.txt > $TESTDIR/fanboy-tracking-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-tracking-merged2.txt $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-tracking-merged.txt $MAINDIR/fanboy-tracking.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-tracking.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-tracking.txt.gz $TESTDIR/fanboy-tracking-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 22:47:37 +12:00
|
|
|
|
|
|
|
# IE: Fanboy-Tracking
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/ie/tracking-ie-generator.sh
|
2012-08-27 19:30:49 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-tracking-merged.txt: fanboy-tracking-general.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-tracking-general.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-tracking-merged.txt (fanboy-tracking-general.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-tracking-general.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-tracking-nonenglish.txt #######################################
|
2012-08-27 19:30:49 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-tracking/fanboy-tracking-nonenglish.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-tracking/fanboy-tracking-nonenglish.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-tracking-nonenglish.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
# Clean up
|
|
|
|
#
|
|
|
|
rm -rf $TESTDIR/fanboy-tracking-merged.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-tracking/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-generic.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-adult.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-general.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-nonenglish.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-whitelist.txt > $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-tracking-merged.txt" ]; then
|
2012-08-27 19:30:49 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-tracking/fanboy-tracking-nonenglish.txt $MAINDIR/split/fanboy-tracking-nonenglish.txt
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-tracking-merged.txt > $TESTDIR/fanboy-tracking-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-tracking-merged2.txt $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-tracking-merged.txt $MAINDIR/fanboy-tracking.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-tracking.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-tracking.txt.gz $TESTDIR/fanboy-tracking-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 22:47:37 +12:00
|
|
|
|
|
|
|
# IE: Fanboy-Tracking
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/ie/tracking-ie-generator.sh
|
2012-08-27 19:30:49 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-tracking-merged.txt: fanboy-tracking-nonenglish.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-tracking-nonenglish.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-tracking-merged.txt (fanboy-tracking-nonenglish.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-tracking-nonenglish.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-tracking-adult.txt #######################################
|
2012-08-27 19:30:49 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-tracking/fanboy-tracking-adult.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-tracking/fanboy-tracking-adult.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-tracking-adult.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
# Clean up
|
|
|
|
#
|
|
|
|
rm -rf $TESTDIR/fanboy-tracking-merged.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-tracking/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-generic.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-adult.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-general.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-nonenglish.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-whitelist.txt > $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-tracking-merged.txt" ]; then
|
2012-08-27 19:30:49 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-tracking/fanboy-tracking-adult.txt $MAINDIR/split/fanboy-tracking-adult.txt
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-tracking-merged.txt > $TESTDIR/fanboy-tracking-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-tracking-merged2.txt $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-tracking-merged.txt $MAINDIR/fanboy-tracking.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-tracking.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-tracking.txt.gz $TESTDIR/fanboy-tracking-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 22:47:37 +12:00
|
|
|
|
|
|
|
# IE: Fanboy-Tracking
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/ie/tracking-ie-generator.sh
|
2012-08-27 19:30:49 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-tracking-merged.txt: fanboy-tracking-adult.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-tracking-adult.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-tracking-merged.txt (fanboy-tracking-adult.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-tracking-adult.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-tracking-whitelist.txt #######################################
|
2012-08-27 19:30:49 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-tracking/fanboy-tracking-whitelist.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-tracking/fanboy-tracking-whitelist.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-tracking-whitelist.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
# Clean up
|
|
|
|
#
|
|
|
|
rm -rf $TESTDIR/fanboy-tracking-merged.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-tracking/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-generic.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-adult.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-general.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-nonenglish.txt \
|
|
|
|
$HGSERV/fanboy-tracking/fanboy-tracking-whitelist.txt > $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
2012-08-27 20:29:52 +12:00
|
|
|
if [ -s "$TESTDIR/fanboy-tracking-merged.txt" ]; then
|
2012-08-27 19:30:49 +12:00
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-tracking/fanboy-tracking-whitelist.txt $MAINDIR/split/fanboy-tracking-whitelist.txt
|
|
|
|
# Remove empty lines
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-tracking-merged.txt > $TESTDIR/fanboy-tracking-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-tracking-merged2.txt $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-tracking-merged.txt
|
|
|
|
# Compress
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-tracking-merged.txt $MAINDIR/fanboy-tracking.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-tracking.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-tracking.txt.gz $TESTDIR/fanboy-tracking-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-29 22:47:37 +12:00
|
|
|
|
|
|
|
# IE: Fanboy-Tracking
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/ie/tracking-ie-generator.sh
|
2012-08-27 19:30:49 +12:00
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-tracking-merged.txt: fanboy-tracking-whitelist.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-tracking-whitelist.txt" > /dev/null
|
|
|
|
fi
|
2012-08-23 00:13:10 +12:00
|
|
|
else
|
2012-08-27 19:30:49 +12:00
|
|
|
echo "fanboy-tracking-merged.txt (fanboy-tracking-whitelist.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-tracking-whitelist.txt failed to update: $DATE"
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-addon-generic.txt #######################################
|
2012-09-05 23:13:07 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
2012-09-05 23:33:20 +12:00
|
|
|
if [ -s "$HGSERV/fanboy-addon/fanboy-addon-generic.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
2012-09-05 23:13:07 +12:00
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-addon/fanboy-addon-generic.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-addon-generic.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
# Clean up
|
|
|
|
#
|
|
|
|
rm -rf $TESTDIR/fanboy-addon-merged.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-addon/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-generic.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-intl.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements.txt \
|
2012-09-05 23:51:39 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-specific.txt \
|
2012-09-05 23:13:07 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-exceptions.txt > $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
# English
|
|
|
|
rm -rf $TESTDIR/fanboy-addon-merged-english.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-addon/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-generic.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements.txt \
|
2012-09-05 23:51:39 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-specific.txt \
|
2012-09-05 23:13:07 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-exceptions.txt > $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
|
|
|
if [ -s "$TESTDIR/fanboy-addon-merged.txt" ]; then
|
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-addon/fanboy-addon-generic.txt $MAINDIR/split/fanboy-addon-generic.txt
|
|
|
|
|
|
|
|
# Remove empty lines (International)
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-addon-merged.txt > $TESTDIR/fanboy-addon-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-addon-merged2.txt $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
|
|
|
|
# Remove empty lines (English)
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-addon-merged-english.txt > $TESTDIR/fanboy-addon-merged-english2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-addon-merged-english2.txt $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
|
|
|
|
# Compress (International)
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-addon-merged.txt $MAINDIR/fanboy-addon.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-addon.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-addon.txt.gz $TESTDIR/fanboy-addon-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Compress (English)
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-addon-merged-english.txt $MAINDIR/fanboy-addon-english.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-addon-english.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-addon-english.txt.gz $TESTDIR/fanboy-addon-merged-english.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
|
|
|
|
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-addon-generic.txt: fanboy-addon-merged.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-addon-generic.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-addon-generic.txt (fanboy-addon-merged.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-tracking-thirdparty.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-addon-thirdparty.txt #######################################
|
2012-09-05 23:13:07 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
2012-09-05 23:33:20 +12:00
|
|
|
if [ -s "$HGSERV/fanboy-addon/fanboy-addon-thirdparty.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
2012-09-05 23:13:07 +12:00
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-addon/fanboy-addon-thirdparty.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-addon-thirdparty.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
# Clean up
|
|
|
|
#
|
|
|
|
rm -rf $TESTDIR/fanboy-addon-merged.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-addon/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-generic.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-intl.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements.txt \
|
2012-09-05 23:51:39 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-specific.txt \
|
2012-09-05 23:13:07 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-exceptions.txt > $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
# English
|
|
|
|
rm -rf $TESTDIR/fanboy-addon-merged-english.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-addon/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-generic.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements.txt \
|
2012-09-05 23:51:39 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-specific.txt \
|
2012-09-05 23:13:07 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-exceptions.txt > $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
|
|
|
if [ -s "$TESTDIR/fanboy-addon-merged.txt" ]; then
|
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-addon/fanboy-addon-thirdparty.txt $MAINDIR/split/fanboy-addon-thirdparty.txt
|
|
|
|
|
|
|
|
# Remove empty lines (International)
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-addon-merged.txt > $TESTDIR/fanboy-addon-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-addon-merged2.txt $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
|
|
|
|
# Remove empty lines (English)
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-addon-merged-english.txt > $TESTDIR/fanboy-addon-merged-english2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-addon-merged-english2.txt $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Compress (International)
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-addon-merged.txt $MAINDIR/fanboy-addon.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-addon.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-addon.txt.gz $TESTDIR/fanboy-addon-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Compress (English)
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-addon-merged-english.txt $MAINDIR/fanboy-addon-english.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-addon-english.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-addon-english.txt.gz $TESTDIR/fanboy-addon-merged-english.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
|
|
|
|
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-addon-generic.txt: fanboy-addon-merged.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-addon-generic.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-addon-generic.txt (fanboy-addon-merged.tx) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-tracking-thirdparty.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-addon-firstparty.txt #######################################
|
2012-09-05 23:13:07 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
2012-09-05 23:33:20 +12:00
|
|
|
if [ -s "$HGSERV/fanboy-addon/fanboy-addon-firstparty.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
2012-09-05 23:13:07 +12:00
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-addon/fanboy-addon-firstparty.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-addon-firstparty.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
# Clean up
|
|
|
|
#
|
|
|
|
rm -rf $TESTDIR/fanboy-addon-merged.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-addon/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-generic.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-intl.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements.txt \
|
2012-09-05 23:51:39 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-specific.txt \
|
2012-09-05 23:13:07 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-exceptions.txt > $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
# English
|
|
|
|
rm -rf $TESTDIR/fanboy-addon-merged-english.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-addon/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-generic.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements.txt \
|
2012-09-05 23:51:39 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-specific.txt \
|
2012-09-05 23:13:07 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-exceptions.txt > $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
|
|
|
if [ -s "$TESTDIR/fanboy-addon-merged.txt" ]; then
|
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-addon/fanboy-addon-firstparty.txt $MAINDIR/split/fanboy-addon-firstparty.txt
|
|
|
|
|
|
|
|
# Remove empty lines (International)
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-addon-merged.txt > $TESTDIR/fanboy-addon-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-addon-merged2.txt $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
|
|
|
|
# Remove empty lines (English)
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-addon-merged-english.txt > $TESTDIR/fanboy-addon-merged-english2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-addon-merged-english2.txt $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Compress (International)
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-addon-merged.txt $MAINDIR/fanboy-addon.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-addon.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-addon.txt.gz $TESTDIR/fanboy-addon-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Compress (English)
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-addon-merged-english.txt $MAINDIR/fanboy-addon-english.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-addon-english.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-addon-english.txt.gz $TESTDIR/fanboy-addon-merged-english.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
|
|
|
|
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-addon-firstparty.txt: fanboy-addon-firstparty.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-addon-firstparty.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-addon-generic.txt (fanboy-addon-firstparty.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-tracking-thirdparty.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-addon-whitelists.txt #######################################
|
2012-09-05 23:13:07 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
2012-09-05 23:33:20 +12:00
|
|
|
if [ -s "$HGSERV/fanboy-addon/fanboy-addon-whitelists.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
2012-09-05 23:13:07 +12:00
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-addon/fanboy-addon-whitelists.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-addon-whitelists.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
# Clean up
|
|
|
|
#
|
|
|
|
rm -rf $TESTDIR/fanboy-addon-merged.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-addon/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-generic.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-intl.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements.txt \
|
2012-09-05 23:51:39 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-specific.txt \
|
2012-09-05 23:13:07 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-exceptions.txt > $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
# English
|
|
|
|
rm -rf $TESTDIR/fanboy-addon-merged-english.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-addon/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-generic.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements.txt \
|
2012-09-05 23:51:39 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-specific.txt \
|
2012-09-05 23:13:07 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-exceptions.txt > $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
|
|
|
if [ -s "$TESTDIR/fanboy-addon-merged.txt" ]; then
|
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-addon/fanboy-addon-whitelists.txt $MAINDIR/split/fanboy-addon-whitelists.txt
|
|
|
|
|
|
|
|
# Remove empty lines (International)
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-addon-merged.txt > $TESTDIR/fanboy-addon-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-addon-merged2.txt $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
|
|
|
|
# Remove empty lines (English)
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-addon-merged-english.txt > $TESTDIR/fanboy-addon-merged-english2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-addon-merged-english2.txt $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Compress (International)
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-addon-merged.txt $MAINDIR/fanboy-addon.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-addon.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-addon.txt.gz $TESTDIR/fanboy-addon-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Compress (English)
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-addon-merged-english.txt $MAINDIR/fanboy-addon-english.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-addon-english.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-addon-english.txt.gz $TESTDIR/fanboy-addon-merged-english.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
|
|
|
|
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-addon-firstparty.txt: fanboy-addon-whitelists.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-addon-whitelists.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-addon-whitelists.txt (fanboy-addon-whitelists.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-tracking-thirdparty.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-addon-intl.txt #######################################
|
2012-09-05 23:13:07 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
2012-09-05 23:33:20 +12:00
|
|
|
if [ -s "$HGSERV/fanboy-addon/fanboy-addon-intl.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
2012-09-05 23:13:07 +12:00
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-addon/fanboy-addon-intl.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-addon-intl.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
# Clean up
|
|
|
|
#
|
|
|
|
rm -rf $TESTDIR/fanboy-addon-merged.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-addon/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-generic.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-intl.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements.txt \
|
2012-09-05 23:51:39 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-specific.txt \
|
2012-09-05 23:13:07 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-exceptions.txt > $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
|
|
|
if [ -s "$TESTDIR/fanboy-addon-merged.txt" ]; then
|
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-addon/fanboy-addon-intl.txt $MAINDIR/split/fanboy-addon-intl.txt
|
|
|
|
|
|
|
|
# Remove empty lines (International)
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-addon-merged.txt > $TESTDIR/fanboy-addon-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-addon-merged2.txt $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
|
|
|
|
# Compress (International)
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-addon-merged.txt $MAINDIR/fanboy-addon.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-addon.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-addon.txt.gz $TESTDIR/fanboy-addon-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
|
|
|
|
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-addon-intl.txt: fanboy-addon-intl.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-addon-intl.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-addon-intl.txt (fanboy-addon-intl.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-tracking-thirdparty.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-addon-elements.txt #######################################
|
2012-09-05 23:13:07 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
2012-09-05 23:33:20 +12:00
|
|
|
if [ -s "$HGSERV/fanboy-addon/fanboy-addon-elements.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
2012-09-05 23:13:07 +12:00
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-addon/fanboy-addon-elements.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-addon-elements.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
# Clean up
|
|
|
|
#
|
|
|
|
rm -rf $TESTDIR/fanboy-addon-merged.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-addon/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-generic.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-intl.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements.txt \
|
2012-09-05 23:51:39 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-specific.txt \
|
2012-09-05 23:13:07 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-exceptions.txt > $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
# English
|
|
|
|
rm -rf $TESTDIR/fanboy-addon-merged-english.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-addon/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-generic.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements.txt \
|
2012-09-05 23:51:39 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-specific.txt \
|
2012-09-05 23:13:07 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-exceptions.txt > $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
|
|
|
if [ -s "$TESTDIR/fanboy-addon-merged.txt" ]; then
|
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-addon/fanboy-addon-elements.txt $MAINDIR/split/fanboy-addon-elements.txt
|
|
|
|
|
|
|
|
# Remove empty lines (International)
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-addon-merged.txt > $TESTDIR/fanboy-addon-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-addon-merged2.txt $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
|
|
|
|
# Remove empty lines (English)
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-addon-merged-english.txt > $TESTDIR/fanboy-addon-merged-english2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-addon-merged-english2.txt $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Compress (International)
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-addon-merged.txt $MAINDIR/fanboy-addon.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-addon.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-addon.txt.gz $TESTDIR/fanboy-addon-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Compress (English)
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-addon-merged-english.txt $MAINDIR/fanboy-addon-english.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-addon-english.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-addon-english.txt.gz $TESTDIR/fanboy-addon-merged-english.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
|
|
|
|
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-addon-elements.txt: fanboy-addon-elements.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-addon-elements.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-addon-whitelists.txt (fanboy-addon-elements.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-tracking-thirdparty.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-addon-elements-specific.txt #######################################
|
2012-09-05 23:51:39 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
|
|
|
if [ -s "$HGSERV/fanboy-addon/fanboy-addon-elements-specific.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-addon/fanboy-addon-elements-specific.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-addon-elements-specific.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
# Clean up
|
|
|
|
#
|
|
|
|
rm -rf $TESTDIR/fanboy-addon-merged.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-addon/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-generic.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-intl.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-specific.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-exceptions.txt > $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
# English
|
|
|
|
rm -rf $TESTDIR/fanboy-addon-merged-english.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-addon/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-generic.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-specific.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-exceptions.txt > $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
|
|
|
if [ -s "$TESTDIR/fanboy-addon-merged.txt" ]; then
|
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-addon/fanboy-addon-elements-specific.txt $MAINDIR/split/fanboy-addon-elements-specific.txt
|
|
|
|
|
|
|
|
# Remove empty lines (International)
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-addon-merged.txt > $TESTDIR/fanboy-addon-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-addon-merged2.txt $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
|
|
|
|
# Remove empty lines (English)
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-addon-merged-english.txt > $TESTDIR/fanboy-addon-merged-english2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-addon-merged-english2.txt $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Compress (International)
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-addon-merged.txt $MAINDIR/fanboy-addon.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-addon.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-addon.txt.gz $TESTDIR/fanboy-addon-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Compress (English)
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-addon-merged-english.txt $MAINDIR/fanboy-addon-english.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-addon-english.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-addon-english.txt.gz $TESTDIR/fanboy-addon-merged-english.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
|
|
|
|
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-addon-elements-specific.txt: fanboy-addon-elements-specific.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-addon-elements-specific.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-addon-elements-specific.txt (fanboy-addon-elements-specific.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-tracking-elements-exceptions.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
2012-09-07 20:15:24 +12:00
|
|
|
####################################### fanboy-addon-elements-exceptions.txt #######################################
|
2012-09-05 23:13:07 +12:00
|
|
|
# Make sure the file exists, and the work directorys are also there before processing.
|
|
|
|
#
|
2012-09-05 23:33:20 +12:00
|
|
|
if [ -s "$HGSERV/fanboy-addon/fanboy-addon-elements-exceptions.txt" ] && [ -d "$TESTDIR" ] && [ -d "$MAINDIR" ] && [ -d "$HGSERV" ];
|
2012-09-05 23:13:07 +12:00
|
|
|
then
|
|
|
|
# Compare differences, only process if file has changed..
|
|
|
|
#
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/fanboy-addon/fanboy-addon-elements-exceptions.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/split/fanboy-addon-elements-exceptions.txt | cut -d' ' -f1)
|
|
|
|
#
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
# Clean up
|
|
|
|
#
|
|
|
|
rm -rf $TESTDIR/fanboy-addon-merged.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-addon/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-generic.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-intl.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements.txt \
|
2012-09-05 23:51:39 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-specific.txt \
|
2012-09-05 23:13:07 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-exceptions.txt > $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
# English
|
|
|
|
rm -rf $TESTDIR/fanboy-addon-merged-english.txt > /dev/null
|
|
|
|
$CAT $HGSERV/fanboy-addon/fanboy-header.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-generic.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-thirdparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-firstparty.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-whitelists.txt \
|
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements.txt \
|
2012-09-05 23:51:39 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-specific.txt \
|
2012-09-05 23:13:07 +12:00
|
|
|
$HGSERV/fanboy-addon/fanboy-addon-elements-exceptions.txt > $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Make sure the file exists
|
|
|
|
#
|
|
|
|
if [ -s "$TESTDIR/fanboy-addon-merged.txt" ]; then
|
|
|
|
# Copy over
|
|
|
|
#
|
|
|
|
cp -f $HGSERV/fanboy-addon/fanboy-addon-elements-exceptions.txt $MAINDIR/split/fanboy-addon-elements-exceptions.txt
|
|
|
|
|
|
|
|
# Remove empty lines (International)
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-addon-merged.txt > $TESTDIR/fanboy-addon-merged2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-addon-merged2.txt $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
|
|
|
|
# Remove empty lines (English)
|
|
|
|
#
|
|
|
|
sed '/^$/d' $TESTDIR/fanboy-addon-merged-english.txt > $TESTDIR/fanboy-addon-merged-english2.txt
|
|
|
|
mv -f $TESTDIR/fanboy-addon-merged-english2.txt $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Checksum
|
|
|
|
#
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-addon-merged.txt
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-addon-merged-english.txt
|
|
|
|
|
|
|
|
# Compress (International)
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-addon-merged.txt $MAINDIR/fanboy-addon.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-addon.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-addon.txt.gz $TESTDIR/fanboy-addon-merged.txt > /dev/null
|
|
|
|
|
|
|
|
# Compress (English)
|
|
|
|
#
|
|
|
|
cp -f $TESTDIR/fanboy-addon-merged-english.txt $MAINDIR/fanboy-addon-english.txt
|
|
|
|
rm -rf $MAINDIR/fanboy-addon-english.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-addon-english.txt.gz $TESTDIR/fanboy-addon-merged-english.txt > /dev/null
|
|
|
|
|
|
|
|
# Fanboy Ultimate + Complete
|
|
|
|
#
|
|
|
|
$NICE $HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
|
|
|
|
|
|
|
else
|
|
|
|
# If the Cat fails.
|
|
|
|
echo "Error creating file fanboy-addon-elements-exceptions.txt: fanboy-addon-elements-exceptions.txt - $DATE" >> $LOGFILE
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# File check hg vs secure.fanboy.co.nz
|
|
|
|
echo "Files are the same: fanboy-addon-elements-exceptions.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "fanboy-addon-elements-exceptions.txt (fanboy-addon-elements-exceptions.txt) failed to update: $DATE" >> $LOGFILE
|
|
|
|
# twidge update "fanboy-tracking-elements-exceptions.txt failed to update: $DATE"
|
|
|
|
fi
|
|
|
|
|
2012-08-23 00:13:10 +12:00
|
|
|
############### Fanboy Enhanced Trackers #################
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/enhancedstats-addon.txt | cut -d' ' -f1)
|
2012-08-26 12:41:46 +12:00
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/enhancedstats.txt | cut -d' ' -f1)
|
2012-08-23 00:13:10 +12:00
|
|
|
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
# Copy list
|
2012-08-23 23:48:14 +12:00
|
|
|
cp -f $HGSERV/enhancedstats-addon.txt $TESTDIR/enhancedstats.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
# Re-generate checksum
|
2012-08-23 23:48:14 +12:00
|
|
|
$ADDCHECKSUM $TESTDIR/enhancedstats.txt
|
|
|
|
cp -f $TESTDIR/enhancedstats.txt $MAINDIR/enhancedstats.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
rm -rf $MAINDIR/enhancedstats.txt.gz
|
|
|
|
# GZip
|
2012-08-23 23:48:14 +12:00
|
|
|
$ZIP $MAINDIR/enhancedstats.txt.gz $TESTDIR/enhancedstats-addon.txt > /dev/null
|
2012-08-23 00:13:10 +12:00
|
|
|
# Combine Regional trackers
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-intl-tracking.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Combine
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-merged.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Combine (Main+Tracking+Enhanced) and Ultimate (Main+Tracking+Enhanced+Annoyances)
|
2012-08-30 21:00:13 +12:00
|
|
|
$HGSERV/scripts/combine/firefox-adblock-ultimate.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Firefox2Opera
|
|
|
|
# $NICE $HGSERV/scripts/firefox2opera.sh
|
|
|
|
else
|
|
|
|
echo "Files are the same: enhancedstats.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
|
|
|
|
############### Fanboy CZECH #################
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/firefox-regional/fanboy-adblocklist-cz.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/fanboy-czech.txt | cut -d' ' -f1)
|
|
|
|
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
cp -f $HGSERV/firefox-regional/fanboy-adblocklist-cz.txt $TESTDIR/fanboy-czech.txt
|
|
|
|
# Re-generate checksum
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-czech.txt
|
|
|
|
cp -f $TESTDIR/fanboy-czech.txt $MAINDIR/fanboy-czech.txt
|
|
|
|
# Remove old copy, then gzip it
|
|
|
|
rm -rf $MAINDIR/fanboy-czech.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-czech.txt.gz $TESTDIR/fanboy-czech.txt > /dev/null
|
|
|
|
# Combine Regional trackers
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-intl-tracking.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Generate IE script
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/ie/czech-ie-generator.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Combine
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-czech.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
else
|
|
|
|
echo "Files are the same: fanboy-czech.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
|
|
|
|
############### Fanboy Russian #################
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/firefox-regional/fanboy-adblocklist-rus-v2.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/fanboy-russian.txt | cut -d' ' -f1)
|
|
|
|
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
cp -f $HGSERV/firefox-regional/fanboy-adblocklist-rus-v2.txt $TESTDIR/fanboy-russian.txt
|
|
|
|
# Re-generate checksum
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-russian.txt
|
|
|
|
cp -f $TESTDIR/fanboy-russian.txt $MAINDIR/fanboy-russian.txt
|
|
|
|
# Wipe old files
|
|
|
|
rm -rf $MAINDIR/fanboy-russian.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-russian.txt.gz $TESTDIR/fanboy-russian.txt > /dev/null
|
|
|
|
# Combine Regional trackers
|
|
|
|
$HGSYNC/scripts/combine/firefox-adblock-intl-tracking.sh
|
|
|
|
# Generate IE script
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/ie/russian-ie-generator.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Combine
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-rus.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Generate Opera RUS script also
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/firefox/opera-russian.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
else
|
|
|
|
echo "Files are the same: fanboy-russian.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
|
|
|
|
############### Fanboy Turkish #################
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/firefox-regional/fanboy-adblocklist-tky.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/fanboy-turkish.txt | cut -d' ' -f1)
|
|
|
|
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 19:01:41 +12:00
|
|
|
cp -f $HGSERV/firefox-regional/fanboy-adblocklist-tky.txt $TESTDIR/fanboy-turkish.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
# Re-generate checksum
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-turkish.txt
|
|
|
|
cp -f $TESTDIR/fanboy-turkish.txt $MAINDIR/fanboy-turkish.txt
|
|
|
|
# Wipe old files
|
|
|
|
rm -rf $MAINDIR/fanboy-turkish.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-turkish.txt.gz $TESTDIR/fanboy-turkish.txt > /dev/null
|
|
|
|
# Combine Regional trackers
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-intl-tracking.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Generate IE script
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/ie/turkish-ie-generator.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Combine
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-turk.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
else
|
|
|
|
echo "Files are the same: fanboy-turkish.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
|
|
|
|
############### Fanboy JAPANESE #################
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/firefox-regional/fanboy-adblocklist-jpn.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/fanboy-japanese.txt | cut -d' ' -f1)
|
|
|
|
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
cp -f $HGSERV/firefox-regional/fanboy-adblocklist-jpn.txt $TESTDIR/fanboy-japanese.txt
|
|
|
|
# Re-generate checksum
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-japanese.txt
|
|
|
|
# Wipe old files
|
|
|
|
rm -rf $MAINDIR/fanboy-japanese.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-japanese.txt.gz $TESTDIR/fanboy-japanese.txt > /dev/null
|
|
|
|
# Combine Regional trackers
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-intl-tracking.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Generate IE script
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/ie/japanese-ie-generator.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Combine
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-jpn.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
else
|
|
|
|
echo "Files are the same: fanboy-japanese.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
|
|
|
|
############### Fanboy KOREAN #################
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/firefox-regional/fanboy-adblocklist-krn.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/fanboy-korean.txt | cut -d' ' -f1)
|
|
|
|
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
cp -f $HGSERV/firefox-regional/fanboy-adblocklist-krn.txt $TESTDIR/fanboy-korean.txt
|
|
|
|
# Re-generate checksum
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-korean.txt
|
|
|
|
cp -f $TESTDIR/fanboy-korean.txt $MAINDIR/fanboy-korean.txt
|
|
|
|
# Wipe old files
|
|
|
|
rm -rf $MAINDIR/fanboy-korean.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-korean.txt.gz $TESTDIR/fanboy-korean.txt > /dev/null
|
|
|
|
# Combine Regional trackers
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-intl-tracking.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Combine
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-krn.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
else
|
|
|
|
echo "Files are the same: fanboy-korean.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
|
|
|
|
############### Fanboy ITALIAN #################
|
2012-08-23 19:01:41 +12:00
|
|
|
SSLHG=$($SHA256SUM $HGSERV/firefox-regional/fanboy-adblocklist-ita.txt | cut -d' ' -f1)
|
2012-08-23 00:13:10 +12:00
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/fanboy-italian.txt | cut -d' ' -f1)
|
|
|
|
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
cp -f $HGSERV/firefox-regional/fanboy-adblocklist-ita.txt $TESTDIR/fanboy-italian.txt
|
|
|
|
# Re-generate checksum
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-italian.txt
|
|
|
|
cp -f $TESTDIR/fanboy-italian.txt $MAINDIR/fanboy-italian.txt
|
|
|
|
$ZIP $MAINDIR/fanboy-italian.txt.gz $TESTDIR/fanboy-italian.txt > /dev/null
|
|
|
|
# Combine Regional trackers
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-intl-tracking.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Generate IE script
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/ie/italian-ie-generator.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Combine
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-ita.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
else
|
|
|
|
echo "Files are the same: fanboy-italian.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
|
|
|
|
############### Fanboy POLISH #################
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/firefox-regional/fanboy-adblocklist-pol.txt | cut -d' ' -f1)
|
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/fanboy-polish.txt | cut -d' ' -f1)
|
|
|
|
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
cp -f $HGSERV/firefox-regional/fanboy-adblocklist-pol.txt $TESTDIR/fanboy-polish.txt
|
|
|
|
# Re-generate checksum
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-polish.txt
|
|
|
|
cp -f $TESTDIR/fanboy-polish.txt $MAINDIR/fanboy-polish.txt
|
|
|
|
# Wipe old files
|
|
|
|
rm -rf $MAINDIR/fanboy-polish.txt.gz
|
|
|
|
$ZIP $MAINDIR/fanboy-polish.txt.gz $TESTDIR/fanboy-polish.txt > /dev/null
|
|
|
|
# Combine Regional trackers
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-intl-tracking.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Combine
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-pol.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
else
|
|
|
|
echo "Files are the same: fanboy-polish.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
|
|
|
|
############### Fanboy INDIAN #################
|
2012-08-23 19:01:41 +12:00
|
|
|
SSLHG=$($SHA256SUM $HGSERV/firefox-regional/fanboy-adblocklist-ind.txt | cut -d' ' -f1)
|
2012-08-23 00:13:10 +12:00
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/fanboy-indian.txt | cut -d' ' -f1)
|
|
|
|
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 19:01:41 +12:00
|
|
|
cp -f $HGSERV/firefox-regional/fanboy-adblocklist-ind.txt $TESTDIR/fanboy-indian.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
# Re-generate checksum
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-indian.txt
|
|
|
|
cp -f $TESTDIR/fanboy-indian.txt $MAINDIR/fanboy-indian.txt
|
|
|
|
# Wipe old files
|
|
|
|
rm -rf $MAINDIR/fanboy-indian.txt.gz
|
2012-08-23 23:48:14 +12:00
|
|
|
$ZIP $MAINDIR/fanboy-indian.txt.gz $TESTDIR/fanboy-indian.txt > /dev/null
|
2012-08-23 00:13:10 +12:00
|
|
|
# Combine Regional trackers
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-intl-tracking.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Combine
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-ind.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
else
|
|
|
|
echo "Files are the same: fanboy-indian.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
|
|
|
|
############### Fanboy VIETNAM #################
|
2012-08-23 19:01:41 +12:00
|
|
|
SSLHG=$($SHA256SUM $HGSERV/firefox-regional/fanboy-adblocklist-vtn.txt | cut -d' ' -f1)
|
2012-08-23 00:13:10 +12:00
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/fanboy-vietnam.txt | cut -d' ' -f1)
|
|
|
|
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 19:01:41 +12:00
|
|
|
cp -f $HGSERV/firefox-regional/fanboy-adblocklist-vtn.txt $TESTDIR/fanboy-vietnam.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
# Re-generate checksum
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-vietnam.txt
|
|
|
|
cp -f $TESTDIR/fanboy-vietnam.txt $MAINDIR/fanboy-vietnam.txt
|
|
|
|
# Wipe old files
|
|
|
|
rm -rf $MAINDIR/fanboy-vietnam.txt.gz
|
2012-08-23 23:48:14 +12:00
|
|
|
$ZIP $MAINDIR/fanboy-vietnam.txt.gz $TESTDIR/fanboy-vietnam.txt > /dev/null
|
2012-08-23 00:13:10 +12:00
|
|
|
# Combine Regional trackers
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-intl-tracking.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Combine
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-vtn.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
else
|
|
|
|
echo "Files are the same: fanboy-vietnam.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
|
|
|
|
############### Fanboy ESPANOL #################
|
2012-08-23 19:01:41 +12:00
|
|
|
SSLHG=$($SHA256SUM $HGSERV/firefox-regional/fanboy-adblocklist-esp.txt | cut -d' ' -f1)
|
2012-08-23 00:13:10 +12:00
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/fanboy-espanol.txt | cut -d' ' -f1)
|
|
|
|
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 19:01:41 +12:00
|
|
|
cp -f $HGSERV/firefox-regional/fanboy-adblocklist-esp.txt $TESTDIR/fanboy-espanol.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
# Re-generate checksum
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-espanol.txt
|
|
|
|
cp -f $TESTDIR/fanboy-espanol.txt $MAINDIR/fanboy-espanol.txt
|
|
|
|
# Wipe old files
|
|
|
|
rm -rf $MAINDIR/fanboy-espanol.txt.gz
|
2012-08-23 23:48:14 +12:00
|
|
|
$ZIP $MAINDIR/fanboy-espanol.txt.gz $TESTDIR/fanboy-espanol.txt > /dev/null
|
2012-08-23 00:13:10 +12:00
|
|
|
# Combine Regional trackers
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-intl-tracking.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Generate IE script
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/ie/espanol-ie-generator.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Combine
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-esp.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
else
|
|
|
|
echo "Files are the same: fanboy-espanol.txt" > /dev/null
|
|
|
|
fi
|
|
|
|
|
|
|
|
############### Fanboy SWEDISH #################
|
2012-08-23 19:01:41 +12:00
|
|
|
SSLHG=$($SHA256SUM $HGSERV/firefox-regional/fanboy-adblocklist-swe.txt | cut -d' ' -f1)
|
2012-08-23 00:13:10 +12:00
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/fanboy-swedish.txt | cut -d' ' -f1)
|
|
|
|
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
2012-08-23 19:01:41 +12:00
|
|
|
cp -f $HGSERV/firefox-regional/fanboy-adblocklist-swe.txt $TESTDIR/fanboy-swedish.txt
|
2012-08-23 00:13:10 +12:00
|
|
|
# Re-generate checksum
|
|
|
|
$ADDCHECKSUM $TESTDIR/fanboy-swedish.txt
|
|
|
|
cp -f $TESTDIR/fanboy-swedish.txt $MAINDIR/fanboy-swedish.txt
|
|
|
|
# Wipe old files
|
|
|
|
rm -rf $MAINDIR/fanboy-swedish.txt.gz
|
2012-08-23 23:48:14 +12:00
|
|
|
$ZIP $MAINDIR/fanboy-swedish.txt.gz $TESTDIR/fanboy-swedish.txt > /dev/null
|
2012-08-23 00:13:10 +12:00
|
|
|
# Combine Regional trackers
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-intl-tracking.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
# Combine
|
2012-08-26 12:41:46 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-swe.sh
|
2012-08-23 00:13:10 +12:00
|
|
|
else
|
|
|
|
echo "Files are the same: fanboy-swedish.txt" > /dev/null
|
2012-08-23 23:48:14 +12:00
|
|
|
fi
|
|
|
|
|
|
|
|
############### Fanboy ISRAELI #################
|
|
|
|
SSLHG=$($SHA256SUM $HGSERV/firefox-regional/IsraelList.txt | cut -d' ' -f1)
|
2012-08-24 18:47:39 +12:00
|
|
|
SSLMAIN=$($SHA256SUM $MAINDIR/IsraelList.txt | cut -d' ' -f1)
|
2012-08-23 23:48:14 +12:00
|
|
|
|
|
|
|
if [ "$SSLHG" != "$SSLMAIN" ]
|
|
|
|
then
|
|
|
|
cp -f $HGSERV/firefox-regional/IsraelList.txt $TESTDIR/IsraelList.txt
|
|
|
|
# Re-generate checksum
|
|
|
|
$ADDCHECKSUM $TESTDIR/IsraelList.txt
|
2012-08-24 09:32:45 +12:00
|
|
|
cp -f $TESTDIR/IsraelList.txt $MAINDIR/IsraelList.txt
|
2012-08-23 23:48:14 +12:00
|
|
|
# Wipe old files
|
|
|
|
rm -rf $MAINDIR/IsraelList.txt.gz
|
|
|
|
$ZIP $MAINDIR/IsraelList.txt.gz $TESTDIR/IsraelList.txt > /dev/null
|
|
|
|
# Combine Regional trackers
|
2012-08-24 09:32:45 +12:00
|
|
|
# $HGSERV/scripts/combine/firefox-adblock-intl-tracking.sh
|
2012-08-23 23:48:14 +12:00
|
|
|
# Combine
|
|
|
|
# $HGSERV/scripts/combine/
|
|
|
|
else
|
|
|
|
echo "Files are the same: IsraelList.txt" > /dev/null
|
2012-08-23 00:13:10 +12:00
|
|
|
fi
|