Localizador não interativo do Mozilla Thunderbird para Slackware

Publicado por Luís Fernando C. Cavalheiro (última atualização em 02/10/2015)

[ Hits: 3.293 ]

Homepage: https://github.com/lcavalheiro/

Download localiza_thunderbird.sh




Este script não interativo altera o SlackBuild mozilla-firefox-l10n de AlienBOB (disponível em http://taper.alienbase.nl/mirrors/people/alien/slackbuilds/mozilla-firefox-l10n/build/) para criar e instalar um pacote com a extensão .xpi necessária para localizar o Thunderbird atualmente instalado no computador para qualquer idioma (padrão: português do Brasil). Após a instalação ele removerá automaticamente as fontes baixadas para criar o pacote e o arquivo do pacote.

Após instalar o pacote vá no gerenciador de addons e ative o .xpi instalado em Languages.

  



Esconder código-fonte

#!/bin/bash
#
# ------------------------------- Legal notice -------------------------------
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# Tradução não-oficial:
#
# Este programa é um software livre; você pode redistribuí-lo e/ou 
# modificá-lo dentro dos termos da Licença Pública Geral GNU como 
# publicada pela Fundação do Software Livre (FSF); na versão 3 da 
# Licença, ou (na sua opinião) qualquer versão.
#
# Este programa é distribuído na esperança de que possa ser útil, 
# mas SEM NENHUMA GARANTIA; sem uma garantia implícita de ADEQUAÇÃO
# a qualquer MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a
# Licença Pública Geral GNU para maiores detalhes.
#
# Você deve ter recebido uma cópia da Licença Pública Geral GNU junto
# com este programa. Se não, veja <http://www.gnu.org/licenses/>.
#
# ------------------------------- Legal notice -------------------------------
#
# ----------------------------------------------------------------------------
#
###### Script: localiza_thunderbird.sh
###### Author: Luís Fernando C. Cavalheiro (pessoal at profcavalheiro dot com)
###### Version: 0.1 (20151002T16:53:54-0300)
#
# ----------------------------------------------------------------------------
#
# ----------------------------------------------------------------------------
#
# Only root user should be able to run this script
if [ "$(id -u)" != "0" ]; then
    echo "This script must be run as root" 1>&2
    exit 1
fi
#
# Set current dir as default:
CURRDIR=$(pwd)
#
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
    case "$MARCH" in
    i?86)   export ARCH=i686 ;;
    x86_64) export ARCH=x86_64 ;;
    # No support for other ARCHes...
    *)      echo "This architecture '$MARCH' is not supported."
            exit 1
            ;;
    esac
fi
#
# Grab which Thunderbird version is installed:
VERSION=$(thunderbird -v 2> /dev/null | grep Thunderbird | cut -d' ' -f3)
#
# Define to which language should Thunderbird be localized (default pt-BR):
PKGLANG=${PKGLANG:-pt-BR}
#
# Set package's build, type and tag:
BUILD=${BUILD:-1}
TAG=${TAG:-alien}
PKGTYPE=${PKGTYPE:-txz}
#
# Get the sources from AlienBOB's repo:
lftp -c 'open http://taper.alienbase.nl ; mirror mirrors/people/alien/slackbuilds/mozilla-firefox-l10n/build/ mozilla-thunderbird-l10n'
#
# Before packaging it we'll need some clever uses of sed...
cd $CURRDIR/mozilla-thunderbird-l10n
mv mozilla-firefox-l10n.SlackBuild mozilla-thunderbird-l10n.SlackBuild
sed -i -e 's/firefox/thunderbird/g' -e 's/Firefox/Thunderbird/g' -e 's/browser\/extensions/extensions/g' mozilla-thunderbird-l10n.SlackBuild
sed -i -e 's/firefox/thunderbird/g' -e 's/Firefox/Thunderbird/g' slack-desc
VERSION=$VERSION PKGLANG=$PKGLANG sh mozilla-thunderbird-l10n.SlackBuild
#
# Time to install package. First of all, check if we have slackpkg+
# installed, since we should use slackpkg to install/upgrade this
# package:
if [ -f /var/log/packages/slackpkg+-1.5.0-noarch-1mt ] ; then
    # Good, we have slackpkg+ here. But are we installing or
    # upgrading this package?
    if [ -f /var/log/packages/mozilla-thunderbird-l10n* ] ; then
        slackpkg upgrade file:/tmp/mozilla-thunderbird-l10n-${PKGLANG}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE}
    else
        slackpkg install file:/tmp/mozilla-thunderbird-l10n-${PKGLANG}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE}
    fi
else
    # That's ok, we don't have slackpkg+ installed. We ought to
    # do it in the old fashioned way:
    upgradepkg --install-new --reinstall /tmp/mozilla-thunderbird-l10n*t?z
fi
#
# Cleaning the mess
cd $CURRDIR
rm -rf $CURRDIR/mozilla-thunderbird-l10n /tmp/*

Scripts recomendados

DNSGEN - Gera e mantém configurações dos servidores DNS

Script para informar o IP válido

Unrar no linux

usando a lixeira em modo texto

verificar os maiores arquivos no HD


  

Comentários

Nenhum comentário foi encontrado.


Contribuir com comentário




Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts