File: LinkChecker.sh

package info (click to toggle)
abinit 9.10.4-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 518,712 kB
  • sloc: xml: 877,568; f90: 577,240; python: 80,760; perl: 7,019; ansic: 4,585; sh: 1,925; javascript: 601; fortran: 557; cpp: 454; objc: 323; makefile: 77; csh: 42; pascal: 31
file content (73 lines) | stat: -rwxr-xr-x 2,333 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash

#
# Copyright (C) 2010-2022 ABINIT Group (Jean-Michel Beuken)
#
# This file is part of the ABINIT software package. For license information,
# please see the COPYING file in the top-level directory of the ABINIT source
# distribution.
#

#set -e

if [ ! -d "site" ]; then
  # Control will enter here if $DIRECTORY doesn't exist.
  echo -e "\n****  something went wrong during the creation of the site **** \n"
  exit 999
fi


export PATH=/home/buildbot/miniconda3/envs/abimkdocs/bin:/home/buildbot/miniconda3/bin:/home/buildbot/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
#conda info --envs
echo -e "***  Enter in abimkdocs envs...\n"
source activate abimkdocs

echo -e "***  Updating python modules...\n"
pip install -q -r requirements.txt &> /dev/null

echo -e "\n***  Starting SimpleHTTPServer...\n"
cd site
#sudo netstat -tapn | grep 8000
~/bin/web.py &>stderr &
jobs
sleep 1
sudo netstat -tapn | grep 8000

echo -e "\n***  Starting linkchecker...\n"

# BB logfiles={ "link-cleaned" : "linkchecker_ext_wo_false_errors.log" },
# "linkchecker_ext.log" is too big  
echo "cmd : linkchecker -v --no-status --check-extern -o xml --ignore-url=.*fonts.gstatic.com http://localhost:8000/ > ../linkchecker_ext.log"

linkchecker -v --no-status --check-extern --timeout 15 -o xml --ignore-url=.*fonts.gstatic.com http://localhost:8000/ > ../linkchecker_ext.log 2> ../linkchecker_ext.err        

echo -e "\n***  Stopping SimpleHTTPServer...\n"
kill %1
sleep 1
sudo netstat -tapn | grep 8000

cd ..

echo -e "\n***  Removing false errors...\n"

#./scripts/bbtools/LinkChecker_rm_false_errors.py linkchecker_ext.log > linkchecker_ext_wo_false_errors.log
LinkChecker_rm_false_errors.py linkchecker_ext.log > linkchecker_ext_wo_false_errors.log; rc=`echo $?`

#echo "exit_status : $rc"
exit $rc


# Temporary until the new abinit production version

#!#CMD="./scripts/bbtools/LinkChecker_rm_false_errors.py"
#!#if [[ -x "$CMD" ]]
#!#then
#!#   # the script is on abinit src
#!#   echo "${CMD} from ABINIT source ( ./scripts/bbtools/ )"
#!#   ./scripts/bbtools/LinkChecker_rm_false_errors.py linkchecker_ext.log > linkchecker_ext_wo_false_errors.log
#!#else
#!#   # the script is on ~/bin
#!#   echo "${CMD} from ~/bin"
#!#   LinkChecker_rm_false_errors.py linkchecker_ext.log > linkchecker_ext_wo_false_errors.log
#!#fi