aboutsummaryrefslogtreecommitdiffstats
path: root/missing_screenshots.sh
blob: 747c657f64474c0a7ee1a8d76a33119b9ea2356d (plain)
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
#!/bin/bash

# THISMIN=$(date +%F%a.T%H.%M) use only the part between () or define it and 
# use later as ${THISMIN}

THISMIN=$(date +%F%a.%H:%M)


echo "Be patient, this will take a while"
echo "Installer for $1"

mkdir -p en/installer/${THISMIN}
chmod o-w en/installer/${THISMIN}
cd en/installer/${THISMIN}
wget --spider -r --no-parent http://docteam.mageia.nl/en/installer/content/images/ 2>&1 | grep "http.*content/images/.*png" | awk '{print $3}' | awk -F'/' '{print $8}' 2>&1 | tee en_installer_PNGs

cd ../../..
mkdir -p $1/installer/${THISMIN}
chmod o-w $1/installer/${THISMIN}
cd $1/installer/${THISMIN}
wget --spider -r --no-parent http://docteam.mageia.nl/$1/installer/content/images/ 2>&1 | grep "http.*content/images/.*png" | awk '{print $3}' | awk -F'/' '{print $8}' 2>&1 | tee $1_installer_PNGs
cd ../../..

echo "Draklive for $1"

mkdir -p en/draklive/${THISMIN}
chmod o-w en/draklive/${THISMIN}
cd en/draklive/${THISMIN}
wget --spider -r --no-parent http://docteam.mageia.nl/en/draklive/content/images/ 2>&1 | grep "http.*content/images/.*png" | awk '{print $3}' | awk -F'/' '{print $8}' 2>&1 | tee en_draklive_PNGs

cd ../../..
mkdir -p $1/draklive/${THISMIN}
chmod o-w $1/draklive/${THISMIN}
cd $1/draklive/${THISMIN}
wget --spider -r --no-parent http://docteam.mageia.nl/$1/draklive/content/images/ 2>&1 | grep "http.*content/images/.*png" | awk '{print $3}' | awk -F'/' '{print $8}' 2>&1 | tee $1_draklive_PNGs

echo "Be patient, the MCC part that follows now takes longer than the installer part"

cd ../../..
mkdir -p en/MCC/${THISMIN}
chmod o-w en/MCC/${THISMIN}
cd en/MCC/${THISMIN}
wget --spider -r --no-parent http://docteam.mageia.nl/en/MCC/content/images/ 2>&1 | grep "http.*content/images/.*png" | awk '{print $3}' | awk -F'/' '{print $8}' 2>&1 | tee en_MCC_PNGs

cd ../../..
mkdir -p $1/MCC/${THISMIN}
chmod o-w $1/MCC/${THISMIN}
cd $1/MCC/${THISMIN}
wget --spider -r --no-parent http://docteam.mageia.nl/$1/MCC/content/images/ 2>&1 | grep "http.*content/images/.*png" | awk '{print $3}' | awk -F'/' '{print $8}' 2>&1 | tee $1_MCC_PNGs

cd ../../..
diff $1/installer/${THISMIN}/$1_installer_PNGs en/installer/${THISMIN}/en_installer_PNGs 2>&1 | tee Missing_$1_installer_sss_${THISMIN}

sed -i 's/> /MISSING: http:\/\/docteam.mageia.nl\/en\/installer\/content\/images\//g' Missing_$1_installer_sss_${THISMIN}

sed -i 's/< /NOT_IN_ENGLISH: http:\/\/docteam.mageia.nl\/$1\/installer\/content\/images\//g' Missing_$1_installer_sss_${THISMIN}

diff $1/draklive/${THISMIN}/$1_draklive_PNGs en/draklive/${THISMIN}/en_draklive_PNGs 2>&1 | tee Missing_$1_draklive_sss_${THISMIN}

sed -i 's/> /MISSING: http:\/\/docteam.mageia.nl\/en\/draklive\/content\/images\//g' Missing_$1_draklive_sss_${THISMIN}

sed -i 's/< /NOT_IN_ENGLISH: http:\/\/docteam.mageia.nl\/$1\/draklive\/content\/images\//g' Missing_$1_draklive_sss_${THISMIN}

diff $1/MCC/${THISMIN}/$1_MCC_PNGs en/MCC/${THISMIN}/en_MCC_PNGs 2>&1 | tee Missing_$1_MCC_sss_${THISMIN}

sed -i 's/> /MISSING: http:\/\/docteam.mageia.nl\/en\/MCC\/content\/images\//g' Missing_$1_MCC_sss_${THISMIN}

sed -i 's/< /NOT_IN_ENGLISH: http:\/\/docteam.mageia.nl\/$1\/MCC\/content\/images\//g' Missing_$1_MCC_sss_${THISMIN}

echo -e "Done, you can find the results in\nMissing_$1_installer_sss_${THISMIN} and in\nMissing_$1_MCC_sss_${THISMIN}"