Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 10th, 2011  |  syntax: Bash  |  size: 0.52 KB  |  views: 225  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  2. DBFILENAME='/usr/share/opera-adblock-complete/urlfilter.ini'
  3. TMPFILENAME='/tmp/opera-adblock-urlfilter.ini'
  4.  
  5. modifyfilters(){
  6.         chown 777 $DBFILENAME
  7.         echo "#UsersOwnFiltersHere" > $DBFILENAME
  8.         if [ -f "$TMPFILENAME" ]; then
  9.                 cat $TMPFILENAME >> $DBFILENAME
  10.         fi
  11. }
  12. while true; do
  13.         read -p "Do you want to keep your own changes to urlfilers and give everyone rights to modify them? [Y/n] "
  14.         case $yn in
  15.                 [Yy]* ) modifyfilters; break;;
  16.         [Nn]* ) exit;;
  17.                 * ) echo "Please answer yes or no.";;
  18.         esac
  19. done
clone this paste RAW Paste Data