aboutsummaryrefslogtreecommitdiffstats
path: root/missing_screenshots.sh
blob: 3d3906dbbc10d0e56c972ab811fc157adab22103 (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/bash

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

# Note that this script ONLY works well if NO English screenshots were pushed
# to the localized directory in Calenco

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


echo "Be patient, this will take a while"
echo "installer manual"


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

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


echo "Draklive manual"

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

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

echo "Netinstall manual"
cd ../../..
mkdir -p en/netinstall/${THISMIN}
chmod o-w en/netinstall/${THISMIN}
cd en/netinstall/${THISMIN}
wget --spider -r --no-parent http://docteam.mageia.org.uk/en/netinstall/content/images/ 2>&1 | grep "http.*content/images/.*png" | awk '{print $3}' | awk -F'/' '{print $8}' 2>&1 | tee en_netinstall_PNGs.txt

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

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.org.uk/en/MCC/content/images/ 2>&1 | grep "http.*content/images/.*png" | awk '{print $3}' | awk -F'/' '{print $8}' 2>&1 | tee en_MCC_PNGs.txt

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

cd ../../..
diff $1/netinstall/${THISMIN}/$1_netinstall_PNGs.txt en/netinstall/${THISMIN}/en_netinstall_PNGs.txt 2>&1 | tee Missing_$1_netinstall_sss_${THISMIN}.txt

sed -i 's/> /MISSING: http:\/\/docteam.mageia.org.uk\/en\/netinstall\/content\/images\//g' Missing_$1_netinstall_sss_${THISMIN}.txt

sed -i 's/< /NOT_IN_ENGLISH: http:\/\/docteam.mageia.org.uk\/$1\/netinstall\/content\/images\//g' Missing_$1_netinstall_sss_${THISMIN}.txt

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

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

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

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

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

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

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

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

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

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