From MozillaWiki
Jump to: navigation, search

I am going to list in here different type of scripts

Install python, zope and buildbot

Generate multiple repositories without an apache or lighthttp server

set -ex
sudo mkdir -p /var/hg/l10n-central
sudo chown -R armenzg /var/hg
sudo cat << MARKER > /var/hg/hgweb.config
l10n-central/ = l10n-central/
cd /var/hg/
hg init l10n-central/af
hg init l10n-central/de
hg serve --webdir-conf /var/hg/hgweb.config

Generates a buildbot master and a slave

buildbot create-master master
buildbot create-slave slave localhost:9989 bot1name bot1passwd

Print all-locales from cvs


import subprocess

def getLocales():
    It returns a list with all locales from all-locales in the repository
    # communicate() returns a tuple - stdio, stderr
    # the output of cvs has a '\n' element at the end
    # a last '' string is generated that we get rid of
    return subprocess.Popen(
        ['cvs', '-q', '-d', '',
         'co', '-p', 'mozilla/browser/locales/all-locales'],

for locale in getLocales():
    print locale

Restart connection

I have not used it personally myself but bhearsum suggested it to me when we were having trouble connecting with my mac or for tunnelblick, I can't remember

for i in 0 1 2; do
 scutil <<EOF
 remove State:/Network/Service/openvpn-tun${i}/IPv4
 remove State:/Network/Service/openvpn-tun${i}/DNS