Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=885c16637c736cd528e07260083e16fc476ec6ed
commit 885c16637c736cd528e07260083e16fc476ec6ed Author: Michel Hermier <herm...@frugalware.org> Date: Thu Apr 15 12:57:42 2010 +0200 mozilla-i18n-regen.sh * Split the FrugalBuild generator from mozilla-i18n.sh to it's own file. diff --git a/source/include/mozilla-i18n-regen.sh b/source/include/mozilla-i18n-regen.sh new file mode 100644 index 0000000..378c1d7 --- /dev/null +++ b/source/include/mozilla-i18n-regen.sh @@ -0,0 +1,41 @@ +#! /bin/bash + +### +# = mozilla-i18n-regen.sh(3) +# Michel Hermier <herm...@frugalware.org> +# +# == NAME +# mozilla-i18n-regen.sh - for Frugalware +# +# == SYNOPSIS +# Tool to regenerate FrugalBuild for Mozilla language packages. +# +# == EXAMPLE +# Update the FrugalBuild of firefox-i18n: +# -------------------------------------------------- +# cd locale-extra/firefox-i18n +# vi FrugalBuild # Edit the FrugalBuild as wanted +# sh ../..//include/mozilla-i18n-regen.sh +# -------------------------------------------------- +### + +mozilla_i18n_lang_describe() +{ + echo "mozilla_i18n_lang_add '$1' '$(sha1sum $lang.xpi | awk '{print $1}')'" +} + +# Cleanup +rm -rf *.xpi +sed -i -r "/^mozilla_i18n_lang_(add|fini)/d" FrugalBuild + +# Make FrugalBuild sourcing silent +source /usr/lib/frugalware/fwmakepkg +source ./FrugalBuild + +# Download the xpi +wget -r -nd "$_F_mozilla_i18n_mirror/$_F_mozilla_i18n_xpidirname/" + +# Regen +mozilla_i18n_foreach_lang mozilla_i18n_lang_describe >> FrugalBuild +echo "mozilla_i18n_lang_fini" >> FrugalBuild + diff --git a/source/include/mozilla-i18n.sh b/source/include/mozilla-i18n.sh index c2fc135..c66b985 100644 --- a/source/include/mozilla-i18n.sh +++ b/source/include/mozilla-i18n.sh @@ -1,21 +1,6 @@ #! /bin/bash -if [ "$1" = "regen" ]; then - # Cleanup - rm -rf *.xpi - sed -i -r "/^mozilla_i18n_lang_(add|fini)/d" FrugalBuild - - # Make FrugalBuild sourcing silent - Finclude() { false; } - source ./FrugalBuild - - if [ -z "$_F_mozilla_i18n_name" -o -z "$pkgver" ]; then - echo "_F_mozilla_i18n_name and pkgver must be defined in your FrugalBuid" - exit 1; - fi -else - Finclude i18n -fi +Finclude i18n ### # = mozilla-i18n.sh(3) @@ -123,16 +108,3 @@ build() { mozilla_i18n_foreach_lang mozilla_i18n_lang_install } -mozilla_i18n_lang_describe() -{ - echo "mozilla_i18n_lang_add '$1' '$(sha1sum $lang.xpi | awk '{print $1}')'" -} - -if [ "$1" = "regen" ]; then - # Download the xpi - wget -r -nd "$_F_mozilla_i18n_mirror/$_F_mozilla_i18n_xpidirname/" - - # Regen - mozilla_i18n_foreach_lang mozilla_i18n_lang_describe >> FrugalBuild - echo "mozilla_i18n_lang_fini" >> FrugalBuild -fi _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git