10,12 → 10,29 |
if [ -d $CATEGORY/$NAME ]; then # zkontroluje jestli vypsane soubory jsou adresare |
echo "processing module:" $NAME |
if [ -r $CATEGORY/$NAME/PrjInfo.txt ]; then # existuje alespon popisny soubor? |
ls $CATEGORY/$NAME/DOC/SRC/ | while read IMAGE; do |
if [ IMAGE == *.jpg ]; then |
echo moving images to $CATEGORY/$NAME/DOC/SRC/img/ |
svn mv --parents $CATEGORY/$NAME/DOC/SRC/IMAGE $CATEGORY/$NAME/DOC/SRC/img/ |
if [ ! -r $CATEGORY/$NAME/DOC/SRC/img/${NAME}_QRcode.png ]; then |
mkdir -p $CATEGORY/$NAME/DOC/SRC/img/ # pokud neexistuje adresar na obrazky, bude vytvoren |
echo creating $CATEGORY/$NAME/DOC/SRC/img/${NAME}_QRcode.png |
qrencode -s 15 -l L "http://www.mlab.cz/PermaLink/$NAME" -o "$CATEGORY/$NAME/DOC/SRC/img/${NAME}_QRcode.png" |
svn add --parents $CATEGORY/$NAME/DOC/SRC/img/${NAME}_QRcode.png |
fi |
|
elif [ -r $CATEGORY/$NAME/DirInfo.txt ]; then # existuje alespon popisny soubor adresare? |
echo "processing modules subcategory:" $CATEGORY/$NAME/ |
ls $CATEGORY/$NAME/ | while read SUBNAME; do # |
if [ -d $CATEGORY/$NAME/$SUBNAME ]; then # zkontroluje jestli vypsane soubory jsou adresare |
if [ -r $CATEGORY/$NAME/$SUBNAME/PrjInfo.txt ]; then # existuje alespon popisny soubor? |
if [ ! -r $CATEGORY/$NAME/$SUBNAME/DOC/SRC/img/${NAME}_QRcode.png ]; then |
mkdir -p $CATEGORY/$NAME/$SUBNAME/DOC/SRC/img/ # pokud neexistuje adresar na obrazky, bude vytvoren |
echo creating $CATEGORY/$NAME/$SUBNAME/DOC/SRC/img/${SUBNAME}_QRcode.png |
qrencode -s 15 -l L "http://www.mlab.cz/PermaLink/$SUBNAME" -o "$CATEGORY/$NAME/$SUBNAME/DOC/SRC/img/${SUBNAME}_QRcode.png" |
svn add --parents $CATEGORY/$NAME/$SUBNAME/DOC/SRC/img/${SUBNAME}_QRcode.png |
fi |
fi |
fi |
done |
else |
echo repair database sctructure of $CATEGORY/$NAME/ |
fi |
else |
echo "Nothing to done" |