From: <li...@us...> - 2004-11-13 17:09:54
|
Update of /cvsroot/frenchmozilla/chatzilla-fr/outils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13166/outils Modified Files: make-xpi update-page.pl Log Message: Modifications mineures (génération locale uniquement maintenant possible, la flemme toussa) Index: make-xpi =================================================================== RCS file: /cvsroot/frenchmozilla/chatzilla-fr/outils/make-xpi,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- make-xpi 6 Nov 2004 17:51:49 -0000 1.6 +++ make-xpi 13 Nov 2004 17:09:44 -0000 1.7 @@ -1,13 +1,18 @@ #!/bin/sh +CZ_FR_VERSION=$1; +CZ_VERSION=$2; +BRANCH=$3; +WEB_UPDATE=true; +if [ $BRANCH = "none" ]; then + BRANCH="unstable"; + WEB_UPDATE=false; +fi MOZBASE="d:/mozilla.org/"; BASEDIR=$MOZBASE"scripts/"; -BRANCHDIR=$BASEDIR"chatzilla-fr/fr-FR/chatzilla/"$3; +BRANCHDIR=$BASEDIR"chatzilla-fr/fr-FR/chatzilla/"$BRANCH; XPIDIR=$BASEDIR"chatzilla-xpi/"; WEBDIR="E:/alex/site web/moz-fr/"; -BRANCH=$3; -CZ_FR_VERSION=$1; -CZ_VERSION=$2; # # uuid chatzilla-fr-FR=125aa783-ef4f-4515-a804-aa67116fdb43 @@ -28,7 +33,7 @@ if [ ! -d $BASEDIR"chatzilla-fr/fr-FR/chatzilla/"$BRANCH ]; then echo "Spécifiez la branche de Chatzilla concernée!"; - echo "$0 $CZ_FR_VERSION czVersion (stable|unstable)"; + echo "$0 $CZ_FR_VERSION czVersion (stable|unstable|none)"; exit 0; fi @@ -87,7 +92,12 @@ echo "Package XPI créé dans $XPIDIR et $WEBDIR"chatzilla-fr-$BRANCH-$CZ_FR_VERSION.xpi""; - + + +if [ $WEB_UPDATE=true ]; then + BRANCH=$3; +fi + echo "Mise à jour du site"; cd "$WEBDIR"; echo "./update-page.pl $CZ_FR_VERSION $CZ_VERSION $BRANCH"; Index: update-page.pl =================================================================== RCS file: /cvsroot/frenchmozilla/chatzilla-fr/outils/update-page.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- update-page.pl 6 Nov 2004 17:51:49 -0000 1.3 +++ update-page.pl 13 Nov 2004 17:09:44 -0000 1.4 @@ -1,13 +1,21 @@ #!/usr/bin/perl + my $i; my $cz_fr_ver; my $cz_ver; - +my $web_update = false; $cz_fr_ver = @ARGV[0]; $cz_ver = @ARGV[1]; $branch = @ARGV[2]; +if($branch eq "none") { + $web_update = "false"; + $branch = "unstable"; +} else { + $web_update = "true"; +} + $file = "chatzilla.inc.php"; $size = (-s $file); open(IN,$file); @@ -17,15 +25,20 @@ &replace; system "cp -f xpi/chatzilla-fr-$branch-$cz_fr_ver.xpi xpi/chatzilla-fr-$branch.xpi"; -system "ncftpput -u lissyx sd177.sivit.org moz-fr/xpi/ xpi/chatzilla-fr-$branch.xpi xpi/chatzilla-fr-$branch-$cz_fr_ver.xpi"; -system "ncftpput -u lissyx sd177.sivit.org moz-fr/ chatzilla.inc.php"; +if($web_update eq "true") { + print "Mise à jour du site sur sd177.\n"; + system "ncftpput -u lissyx sd177.sivit.org moz-fr/xpi/ xpi/chatzilla-fr-$branch.xpi xpi/chatzilla-fr-$branch-$cz_fr_ver.xpi"; + system "ncftpput -u lissyx sd177.sivit.org moz-fr/ chatzilla.inc.php"; +} else { + print "Mise à jour du site en local seulement.\n"; +} sub replace { - if($branch eq "stable") { + if($branch eq "stable" && $web_update eq "true") { $buffer =~ s/\$cz_fr_version_stable = \"([^\"]+)\"/\$cz_fr_version_stable = \"$cz_fr_ver\"/; $buffer =~ s/\$cz_version_stable = \"([^\"]+)\"/\$cz_version_stable = \"$cz_ver\"/; - } elsif ($branch eq "unstable") { + } elsif ($branch eq "unstable" && $web_update eq "true") { $buffer =~ s/\$cz_fr_version_unstable = \"([^\"]+)\"/\$cz_fr_version_unstable = \"$cz_fr_ver\"/; $buffer =~ s/\$cz_version_unstable = \"([^\"]+)\"/\$cz_version_unstable = \"$cz_ver\"/; } |