File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 5353        run : time catchsegv python -m backtesting.test 
5454
5555      - if : matrix.test-type == 'docs' 
56-         run : time catchsegv doc/build.sh 
56+         run : time catchsegv bash  doc/build.sh 
Original file line number Diff line number Diff line change 7171echo  ' Testing for broken links' 
7272echo 
7373pushd  " $BUILDROOT "   > /dev/null
74+ tree . 
7475WEBSITE=' https://kernc\.github\.io/backtesting\.py' 
7576grep -PR ' <a .*?href='   | 
7677    sed -E " s/:.*?<a .*?href=([\" '])(.*?)/\t\2/g"   | 
7778    tr " \" '"   ' #'   | 
7879    cut -d' #'   -f1 | 
7980    sort -u -t$' \t '   -k 2 | 
8081    sort -u | 
82+     tee >( cat 1>&2 )   | 
8183    python -c ' 
8284import sys 
8385from urllib.parse import urljoin 
@@ -90,9 +92,12 @@ for line in sys.stdin.readlines():
9092    grep -v $' \t ' ' $'   | 
9193    while  read  -r line;  do 
9294        while  IFS=$' \t '   read  -r file url;  do 
93-             url=$( python -c ' import html, sys; print(html.unescape(sys.argv[-1]))'   " $url " ) 
94-             [ -f  " $url "   ] || 
95-                 curl --silent --fail --retry 5 --retry-delay 5 --user-agent ' Mozilla/5.0 Firefox 61'   " $url "   > /dev/null 2>&1  || 
95+             target_file=" $( python -c ' import html, sys; print(html.unescape(sys.argv[-1]))'   " $url " ) " 
96+             echo  " $target_file " 
97+             if  [ -f  " $target_file "   ];  then  continue ;  fi 
98+ 
99+             url=" ${url//  /% 20} " 
100+             curl --silent --fail --retry 5 --retry-delay 5 --user-agent ' Mozilla/5.0 Firefox 61'   " $url "   > /dev/null 2>&1  || 
96101                die " broken link in $file :  $url " 
97102        done 
98103    done 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments