Line 4... |
Line 4... |
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 "processing modules category:" $CATEGORY |
8 |
echo "processing modules category:" $CATEGORY |
9 |
cd $CATEGORY # prejde do kategorie modulu |
- |
|
10 |
ls | while read NAME; do # vypise seznam modulu |
9 |
ls $CATEGORY | while read NAME; do # vypise seznam modulu |
11 |
if [ -d $NAME ]; then # zkontroluje jestli vypsane soubory jsou adresare |
10 |
if [ -d $CATEGORY/$NAME ]; then # zkontroluje jestli vypsane soubory jsou adresare |
12 |
echo "processing module:" $NAME |
11 |
echo "processing module:" $NAME |
13 |
if [ -r $NAME/PrjInfo.txt ]; then # existuje alespon popisny soubor? |
12 |
if [ -r $CATEGORY/$NAME/PrjInfo.txt ]; then # existuje alespon popisny soubor? |
- |
|
13 |
if [ ! -r $CATEGORY/$NAME/DOC/SRC/img/${NAME}_QRcode.png ]; then |
14 |
mkdir -p $NAME/DOC/SRC/img/ # pokud neexistuje adresar na obrazky, bude vytvoren |
14 |
mkdir -p $CATEGORY/$NAME/DOC/SRC/img/ # pokud neexistuje adresar na obrazky, bude vytvoren |
15 |
echo creating ./$NAME/DOC/SRC/img/${NAME}_QRcode.png |
15 |
echo creating $CATEGORY/$NAME/DOC/SRC/img/${NAME}_QRcode.png |
16 |
qrencode -s 15 -l L "http://www.mlab.cz/PermaLink/$NAME" -o "./$NAME/DOC/SRC/img/${NAME}_QRcode.png" |
16 |
qrencode -s 15 -l L "http://www.mlab.cz/PermaLink/$NAME" -o "$CATEGORY/$NAME/DOC/SRC/img/${NAME}_QRcode.png" |
17 |
svn add --parents ./$NAME/DOC/SRC/img/${NAME}_QRcode.png |
17 |
svn add --parents $CATEGORY/$NAME/DOC/SRC/img/${NAME}_QRcode.png |
- |
|
18 |
fi |
- |
|
19 |
|
- |
|
20 |
elif [ -r $CATEGORY/$NAME/DirInfo.txt ]; then # existuje alespon popisny soubor adresare? |
- |
|
21 |
echo "processing modules subcategory:" $CATEGORY/$NAME/ |
- |
|
22 |
ls $CATEGORY/$NAME/ | while read SUBNAME; do # |
- |
|
23 |
if [ -d $CATEGORY/$NAME/$SUBNAME ]; then # zkontroluje jestli vypsane soubory jsou adresare |
- |
|
24 |
if [ -r $CATEGORY/$NAME/$SUBNAME/PrjInfo.txt ]; then # existuje alespon popisny soubor? |
- |
|
25 |
if [ ! -r $CATEGORY/$NAME/$SUBNAME/DOC/SRC/img/${NAME}_QRcode.png ]; then |
- |
|
26 |
mkdir -p $CATEGORY/$NAME/$SUBNAME/DOC/SRC/img/ # pokud neexistuje adresar na obrazky, bude vytvoren |
- |
|
27 |
echo creating $CATEGORY/$NAME/$SUBNAME/DOC/SRC/img/${SUBNAME}_QRcode.png |
- |
|
28 |
qrencode -s 15 -l L "http://www.mlab.cz/PermaLink/$SUBNAME" -o "$CATEGORY/$NAME/$SUBNAME/DOC/SRC/img/${SUBNAME}_QRcode.png" |
- |
|
29 |
svn add --parents $CATEGORY/$NAME/$SUBNAME/DOC/SRC/img/${SUBNAME}_QRcode.png |
- |
|
30 |
fi |
- |
|
31 |
fi |
- |
|
32 |
fi |
- |
|
33 |
done |
- |
|
34 |
else |
- |
|
35 |
echo repair database sctructure of $CATEGORY/$NAME/ |
18 |
fi |
36 |
fi |
19 |
else |
37 |
else |
20 |
echo "No module names" |
38 |
echo "Nothing to done" |
21 |
fi |
39 |
fi |
22 |
done |
40 |
done |
23 |
cd .. |
- |
|
24 |
else |
41 |
else |
25 |
echo "No document dir" |
42 |
echo "No document dir" |
26 |
fi |
43 |
fi |
27 |
done |
44 |
done |
28 |
|
45 |
|