Line 8... |
Line 8... |
8 |
echo "processing modules category:" $CATEGORY |
8 |
echo "processing modules category:" $CATEGORY |
9 |
ls $CATEGORY | while read NAME; do # vypise seznam modulu |
9 |
ls $CATEGORY | while read NAME; do # vypise seznam modulu |
10 |
if [ -d $CATEGORY/$NAME ]; then # zkontroluje jestli vypsane soubory jsou adresare |
10 |
if [ -d $CATEGORY/$NAME ]; then # zkontroluje jestli vypsane soubory jsou adresare |
11 |
echo "processing module:" $NAME |
11 |
echo "processing module:" $NAME |
12 |
if [ -r $CATEGORY/$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 $CATEGORY/$NAME/DOC/SRC/img/ # pokud neexistuje adresar na obrazky, bude vytvoren |
- |
|
15 |
echo creating $CATEGORY/$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 $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 # |
13 |
ls $CATEGORY/$NAME/DOC/SRC/ | while read IMAGE; 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 |
14 |
if [ IMAGE == *.jpg ]; 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 |
15 |
echo moving images to $CATEGORY/$NAME/DOC/SRC/img/ |
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 |
16 |
svn mv --parents $CATEGORY/$NAME/DOC/SRC/IMAGE $CATEGORY/$NAME/DOC/SRC/img/ |
30 |
fi |
- |
|
31 |
fi |
- |
|
32 |
fi |
17 |
fi |
33 |
done |
18 |
done |
34 |
else |
- |
|
35 |
echo repair database sctructure of $CATEGORY/$NAME/ |
- |
|
36 |
fi |
19 |
fi |
37 |
else |
20 |
else |
38 |
echo "Nothing to done" |
21 |
echo "Nothing to done" |
39 |
fi |
22 |
fi |
40 |
done |
23 |
done |