3105 |
kaklik |
1 |
#!/bin/bash |
|
|
2 |
cd ../../Modules/ |
|
|
3 |
|
|
|
4 |
echo processing: `pwd` |
|
|
5 |
|
|
|
6 |
ls | while read CATEGORY; do |
|
|
7 |
if [ -d $CATEGORY ]; then |
|
|
8 |
echo $CATEGORY |
|
|
9 |
cd $CATEGORY # prejde do kategorie modulu |
|
|
10 |
ls | while read NAME; do # vypise seznam modulu |
|
|
11 |
if [ -d $NAME ]; then # zkontroluje jestli vypsane soubory jsou adresare |
|
|
12 |
echo $NAME |
|
|
13 |
if [ -d $NAME/DOC/ ]; then # existuje slozka doc? |
|
|
14 |
if [ -d $NAME/DOC/img/ ]; then |
|
|
15 |
echo slozka img existuje |
|
|
16 |
else |
|
|
17 |
echo slozka img neexistuje |
|
|
18 |
mkdir $NAME/DOC/img/ |
|
|
19 |
svn add ./$NAME/DOC/img/ |
|
|
20 |
fi |
|
|
21 |
else |
|
|
22 |
echo slozka doc neexistuje |
|
|
23 |
mkdir -p $NAME/DOC/img/ |
|
|
24 |
svn add ./$NAME/DOC/ |
|
|
25 |
fi |
|
|
26 |
qrencode -s 15 -l L "http://www.mlab.cz/PermaLink/$NAME" -o "./$NAME/DOC/img/$NAME-QRcode.png" |
|
|
27 |
svn add ./$NAME/DOC/img/$NAME-QRcode.png |
|
|
28 |
else |
|
|
29 |
echo "No module names" |
|
|
30 |
fi |
|
|
31 |
done |
|
|
32 |
cd .. |
|
|
33 |
else |
|
|
34 |
echo "No document dir" |
|
|
35 |
fi |
|
|
36 |
done |
|
|
37 |
|
|
|
38 |
exit 0 |