CINES_LOGIN_DEFAULT=foujols CINES_LOGIN=${1:-${CINES_LOGIN_DEFAULT}} echo CINES_LOGIN : ${CINES_LOGIN} cd /ccc/work/cont003/igcmg/igcmg echo "Verification des droits des repertoires TGCC" ccc_shspace_chmod userread /ccc/work/cont003/igcmg/igcmg/IGCM is_problem=` ccc_shspace_modck IGCM |grep ccc_shspace_chmod |wc -l` if [ "x${is_problem}" != "x0" ] then echo "Il y a un probleme de droit sur un repertoire qui ne vous appartient pas" echo "vous pouvez utiliser la commande ccc_shspace_modck IGCM pour savoir qui doit mettre a jour les droits" echo -n "voulez-vous tout de meme continuer la synchronisation [oui/non]" read reponse case ${reponse} in non|NON|N|n) exit ;; esac fi cd /ccc/work/cont003/igcmg/igcmg echo " Resultat du rsync en dry-run : " echo "" echo rsync -n -vrltgoD --progress --delete IGCM ${CINES_LOGIN}@occigen.cines.fr:/scratch/cnt0024/ips2078/SHARED rsync -n -vrltgoD --progress --delete IGCM ${CINES_LOGIN}@occigen.cines.fr:/scratch/cnt0024/ips2078/SHARED echo "Voulez vous effectuer les actions listees ci dessus oui/non ?" echo -n " Votre reponse : " read reponse case ${reponse} in oui|OUI|o) rsync -vrltgoD --progress --chmod=u-w --chmod=g-w --chmod=o-w --delete IGCM ${CINES_LOGIN}@occigen.cines.fr:/scratch/cnt0024/ips2078/SHARED ;; non|NON|n) echo "RIEN A FAIRE !" ;; *) echo "Reponse non reconnue" ;; esac