1 |
#!/bin/bash |
1 |
#!/bin/bash |
2 |
cd ../../Modules/ |
2 |
cd ../../Modules/ |
3 |
|
3 |
|
4 |
echo processing: `pwd` |
4 |
echo processing: `pwd` |
5 |
|
5 |
|
6 |
ls | while read CATEGORY; do |
6 |
ls | while read CATEGORY; do |
7 |
if [ -d $CATEGORY ]; then |
7 |
if [ -d $CATEGORY ]; then |
8 |
echo $CATEGORY |
8 |
echo "processing modules category:" $CATEGORY |
9 |
cd $CATEGORY # prejde do kategorie modulu |
9 |
cd $CATEGORY # prejde do kategorie modulu |
10 |
ls | while read NAME; do # vypise seznam modulu |
10 |
ls | while read NAME; do # vypise seznam modulu |
11 |
if [ -d $NAME ]; then # zkontroluje jestli vypsane soubory jsou adresare |
11 |
if [ -d $NAME ]; then # zkontroluje jestli vypsane soubory jsou adresare |
12 |
echo $NAME |
12 |
echo "processing module:" $NAME |
13 |
if [ -d $NAME/DOC/ ]; then # existuje slozka doc? |
13 |
if [ -r $NAME/PrjInfo.txt ]; then # existuje alespon popisny soubor? |
14 |
if [ -d $NAME/DOC/img/ ]; then |
14 |
mkdir -p $NAME/DOC/SRC/img/ # pokud neexistuje adresar na obrazky, bude vytvoren |
15 |
echo slozka img existuje |
- |
|
16 |
else |
- |
|
17 |
echo slozka img neexistuje |
15 |
echo creating ./$NAME/DOC/SRC/img/${NAME}_QRcode.png |
18 |
mkdir $NAME/DOC/img/ |
16 |
qrencode -s 15 -l L "http://www.mlab.cz/PermaLink/$NAME" -o "./$NAME/DOC/SRC/img/${NAME}_QRcode.png" |
19 |
svn add ./$NAME/DOC/img/ |
17 |
svn add --parents ./$NAME/DOC/SRC/img/${NAME}_QRcode.png |
20 |
fi |
- |
|
21 |
else |
- |
|
22 |
echo slozka doc neexistuje |
- |
|
23 |
mkdir -p $NAME/DOC/img/ |
- |
|
24 |
svn add ./$NAME/DOC/ |
- |
|
25 |
fi |
18 |
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 |
19 |
else |
29 |
echo "No module names" |
20 |
echo "No module names" |
30 |
fi |
21 |
fi |
31 |
done |
22 |
done |
32 |
cd .. |
23 |
cd .. |
33 |
else |
24 |
else |
34 |
echo "No document dir" |
25 |
echo "No document dir" |
35 |
fi |
26 |
fi |
36 |
done |
27 |
done |
37 |
|
28 |
|
38 |
exit 0 |
29 |
exit 0 |