#!/bin/bash

#REP=/home/vincent/Projects/py4childs/pysycache/themes-move
#REPZIP=/home/vincent/web/py4childs/pysycache/telechargement/supplement

REP=/home/vincent/Projects/py4childs/distrib-pysycache

#----------------- mise à jour des droits --------------------------------
chown root:root -R $REP
chmod 755 -R $REP


#-------------------- tar pour linux -------------------------------------
REPZIP=/home/vincent/web/download.gna.org/py4childs/pysycache/v2.0

cd $REP/pysycache/linux

tar cfz $REPZIP/pysycache-2.0.tar.gz  usr/


exit


#-------------------- zip pour les autres -----------------------------------
REPZIP=/home/vincent/web/download.gna.org/py4childs/pysycache/v2.0

cd $REP/pysycache/sources

zip -r $REPZIP/pysycache-2.0.zip  usr


#-------------------- zip pour langues -----------------------------------
REPZIP=/home/vincent/web/download.gna.org/py4childs/pysycache/v2.0

cd $REP/pysycache-lang

for i in $(ls $REP/pysycache-lang);
do
    echo $i

    cd $REP/pysycache-lang/$i
    
    zip -r $REPZIP/"pysycache-lang-"$i"-2.0.zip"  themes-move
done



#-------------------- zip des themes suppl  ------------------------------
REPZIP=/home/vincent/web/themes.pysycache.free.fr

cd $REP/themes-suppl/arbo


for i in $(ls $REP/themes-suppl/arbo);
do
    echo $i

    cd $REP/themes-suppl/arbo/$i
    
    zip -r $REPZIP/$i"-2.0.zip"  themes-move
    zip -r $REPZIP/$i"-2.0.zip"  themes-click
    
done
