scratch/recupall
Yann Esposito (Yogsototh) 56bb9b5699 New method
2010-04-15 11:14:32 +02:00

18 lines
790 B
Bash
Executable file

#!/usr/bin/env zsh
root=/home/e640846/Sites/n3blog
cd $root
for langue in fr en; do
\cp -r ../webroot/content/* content/html/$langue
cp recup.pl recup$langue.pl
[[ $langue = "fr" ]] && other=en
[[ $langue = "en" ]] && other=fr
echo 'replaceminim( "'$langue':","::" 1);' >> recup$langue.pl
echo 'replaceminim( "'$other':","::" 0);' >> recup$langue.pl
echo 'replaceminim( "<'$langue'>", "</'$langue'>", 1);' >> recup$langue.pl
echo 'replaceminim( "<'$other'>", "</'$other'>", 0);' >> recup$langue.pl
echo 'replaceminim( "!!'$langue'!!", "!!!!", 1);' >> recup$langue.pl
echo 'replaceminim( "!!'$other'!!", "!!!!", 0);' >> recup$langue.pl
echo 's#date:#created_at:#' >> recup$langue.pl
perl -pi recup$langue.pl content/html/$langue/**/*(.)
done