SHARE
TWEET

Untitled

a guest Jun 10th, 2011 229 Never
  1. #!/bin/bash
  2. DBFILENAME='/usr/share/opera-adblock-complete/urlfilter.ini'
  3. TMPFILENAME='/tmp/opera-adblock-urlfilter.ini'
  4. if [ -f "$DBFILENAME" ]; then
  5.         if [ -f "$TMPFILENAME" ]; then
  6.                 rm $TMPFILENAME
  7.         fi
  8.         IFS=$'\n'
  9.         for LINE in $(<$DBFILENAME); do
  10.                 if [[ -n "$USERFILERS"  ]]; then
  11.                         echo "$LINE" >> $TMPFILENAME
  12.                 else
  13.                         if [[ "$LINE" = "#UsersOwnFiltersHere" ]]; then
  14.                                 USERFILERS=true
  15.                         fi
  16.                 fi
  17.         done
  18. fi
RAW Paste Data
Top