forked from plumed/plumed2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
report_errors
executable file
·40 lines (33 loc) · 1 KB
/
report_errors
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
#!/bin/bash
cd html
if [ ! -e tutorial-resources ] ; then
mkdir tutorial-resources
fi
cd ../
for file in ./tutorials/*.txt ; do
check=`grep additional-files: $file | wc -l`
if [ $check -gt 1 ] ; then
echo Input files for tutorials should all be given in a single tarball. $file contains $check files >> errors
elif [ $check -gt 0 ] ; then
resources=`grep additional-files: $file | sed -e 's/additional-files: //'`
for addfile in $resources; do
if test -d tutorials/$addfile; then
cd tutorials
tar czf ../html/tutorial-resources/$addfile.tar.gz $addfile
cd -
else
cp tutorials/$addfile html/tutorial-resources
fi
done
fi
done
nerrors=`wc -l errors | awk '{print NF}'`
if [ $nerrors -eq 0 ] ; then
rm errors
else
echo "************************************************"
echo "Found the following errors in your documentation"
echo ""
cat errors
echo "************************************************"
fi