Line 6... |
Line 6... |
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 |
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 -n " 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 |
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 |
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 |
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" |
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 |
17 |
svn add --parents $CATEGORY/$NAME/DOC/SRC/img/${NAME}_QRcode.png |
18 |
fi |
18 |
fi |
- |
|
19 |
echo "...done" |
19 |
|
20 |
|
20 |
elif [ -r $CATEGORY/$NAME/DirInfo.txt ]; then # existuje alespon popisny soubor adresare? |
21 |
elif [ -r $CATEGORY/$NAME/DirInfo.txt ]; then # existuje alespon popisny soubor adresare? |
21 |
echo "processing modules subcategory:" $CATEGORY/$NAME/ |
22 |
echo -n " processing modules subcategory:" $CATEGORY/$NAME/ |
22 |
ls $CATEGORY/$NAME/ | while read SUBNAME; do # |
23 |
ls $CATEGORY/$NAME/ | while read SUBNAME; do # |
23 |
if [ -d $CATEGORY/$NAME/$SUBNAME ]; then # zkontroluje jestli vypsane soubory jsou adresare |
24 |
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/PrjInfo.txt ]; then # existuje alespon popisny soubor? |
25 |
if [ ! -r $CATEGORY/$NAME/$SUBNAME/DOC/SRC/img/${NAME}_QRcode.png ]; then |
26 |
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 |
mkdir -p $CATEGORY/$NAME/$SUBNAME/DOC/SRC/img/ # pokud neexistuje adresar na obrazky, bude vytvoren |
Line 30... |
Line 31... |
30 |
fi |
31 |
fi |
31 |
fi |
32 |
fi |
32 |
fi |
33 |
fi |
33 |
done |
34 |
done |
34 |
else |
35 |
else |
35 |
echo repair database sctructure of $CATEGORY/$NAME/ |
36 |
echo -e "\n\r Please repair database sctructure of" $CATEGORY/$NAME/ |
36 |
fi |
37 |
fi |
37 |
else |
38 |
else |
38 |
echo "Nothing to done" |
39 |
echo "Nothing to done in category" $CATEGORY |
39 |
fi |
40 |
fi |
40 |
done |
41 |
done |
41 |
else |
42 |
else |
42 |
echo "No document dir" |
43 |
echo "No document dir" |
43 |
fi |
44 |
fi |