/[safari]/get_book.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /get_book.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by dpavlin, Sat Jan 17 16:25:38 2004 UTC revision 1.7 by dpavlin, Sun Feb 15 11:40:43 2004 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2    
3  # proxy settings (same as in firebird)  # proxy settings (same as in firebird)
4  ( ping proxy 2>&1 ) >/dev/null && export http_proxy=http://proxy:8080  fping proxy && export http_proxy=http://proxy:8080
5  # user agent (same as in firebird)  # user agent (same as in firebird)
6  ua="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031225 Firebird/0.7"  ua="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031225 Firebird/0.7"
7    
# Line 23  if [ -e orig ] ; then Line 23  if [ -e orig ] ; then
23          mv orig/* .          mv orig/* .
24          rm -Rf orig          rm -Rf orig
25    
26          grep -l 'promo.asp' * | xargs -i rm -v {}          grep -l 'promo.asp' * | xargs -i rm {}
27            grep -l 'This is only a preview of the full book' * | xargs -i rm {}
28  fi  fi
29    
30  isbn=$1;  isbn=$1;
# Line 101  function mirror_in() { Line 102  function mirror_in() {
102                          echo "WARNING: your safari session is disabled. Aborting."                          echo "WARNING: your safari session is disabled. Aborting."
103                          exit 1                          exit 1
104                  fi                  fi
105    
106                    if grep -i 'This is only a preview of the full book' `ls -t index.html* | head -3` >/dev/null ; then
107                            echo "WARNING: you didn't add this book to your bookshelf!"
108                            exit 1
109                    fi
110          done          done
111  }  }
112    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.26