+++ /dev/null
-#!/bin/bash
-
-DEVICE=/dev/cdroms/cdrom1
-SPEED=4
-CDREC="cdrecord dev=$DEVICE fs=8m speed=$SPEED -v -nofix -pad -audio -"
-
-for i in *.mp3 *.ogg; do
- if test "`file "$i" | grep -i vorbis`"; then
- oggdec -R 1 -o - "$i" | $CDREC
- else
- mpg123 --cdr - "$i" | $CDREC
- fi
-done
-
-cdrecord dev=$DEVICE speed=$SPEED -v -fix
+++ /dev/null
-#!/bin/bash -e
-LOG=`bzr diff ChangeLog| sed -rne '/^\+([[:blank:]]|\-){1,}/{s/^\+[[:blank:]]*//; p}'`
-
-[ -n "$LOG" ] || {
- echo 'no ChangeLog change'
- exit 1
-}
-
-echo -- Log --
-echo "$LOG"
-echo ---------
-
-while read -p "Ok to commit? (Y/n) " -n 1 WHAT; do
- case "$WHAT" in
- y|Y|"")
- break
- echo "YES"
- ;;
- n|N)
- echo
- echo "Aborting."
- exit 0
- ;;
- *)
- echo " -- unknown response."
- ;;
- esac
-done
-
-bzr commit -m "$LOG" "$@"
+++ /dev/null
-#!/bin/sh -e
-
-# check given debs for SSP and print out the deb and filename of non-SSP ELF
-# files
-
-D=`mktemp -d`
-trap "rm -rf $D" 0 1 2 3 11 13 15
-
-[ -f "$1" ] || {
- echo "Usage: $0 <deb>"
- exit 1
-}
-
-dpkg-deb -x "$1" "$D"
-find "$D" -type f | while read f; do
- # ignore non-ELF files
- readelf -h "$f" > /dev/null 2>&1 || continue
- strings "$f" | grep -q __stack_chk_fail || {
- echo "$1: ${f#$D} not built with SSP"
- }
-done
+++ /dev/null
-#!/usr/bin/python
-
-import os, os.path, sys, urllib, subprocess, smtplib
-
-if len(sys.argv) != 2:
- print '''Usage: fixbug <bug number>'''
- sys.exit (1)
-
-bug = int(sys.argv[1])
-desc = sys.stdin.read()
-
-# generate bug report
-report = ''
-
-report += ''' status fixreleased
-
-%s
-''' % desc
-
-# sign it
-sign_command = 'gpg'
-if os.access('/usr/bin/gnome-gpg', os.X_OK):
- sign_command = 'gnome-gpg'
-
-gpg = subprocess.Popen([sign_command, '--clearsign'], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
-signed_report = gpg.communicate(report)[0]
-assert gpg.returncode == 0
-
-# generate email
-myemailaddr = os.getenv('DEBEMAIL')
-assert myemailaddr
-to = '%i@bugs.launchpad.net' % bug
-
-mail = '''From: %s
-To: %s
-Subject: Fixed
-
-%s''' % (myemailaddr, to, signed_report)
-
-s = smtplib.SMTP('fiordland.ubuntu.com')
-s.sendmail(myemailaddr, to, mail)
-s.quit()
+++ /dev/null
-#!/usr/bin/python
-
-import os, sys, subprocess, smtplib, re
-
-#
-# entry point
-#
-
-if len(sys.argv) > 2 or len(sys.argv) == 1 and sys.stdin.isatty():
- print '''Usage: requestsponsor [<debdiff>]
-
-File a sponsoring request bug with the given debdiff. If a debdiff is not
-specified as command line argument, it reads stdin.'''
- sys.exit (1)
-
-if len(sys.argv) == 1:
- # read stdin
- diff = sys.stdin.read()
-else:
- diff = open(sys.argv[1]).read()
-
-# parse diff for source package name
-changelog_header_re = re.compile('^\+([\w.-]+) \([\w.:+-]+\) ([\w-]+); urgency')
-in_changelog = False
-package = None
-release = None
-for l in diff.splitlines():
- if l.startswith('+++ '):
- in_changelog = l.endswith('/debian/changelog')
- if in_changelog:
- m = changelog_header_re.match(l)
- if m:
- package = m.group(1)
- release = m.group(2)
- break
-
-assert package
-assert release
-
-# strip pocket from release
-release = release.split('-')[0]
-
-# determine team (main/universe)
-if subprocess.call('apt-cache madison %s | \
- egrep -q "%s/(main|restricted).*Sources"' % (package, release), shell=True) == 0:
- team = 'ubuntu-main-sponsors'
-else:
- team = 'ubuntu-universe-sponsors'
-
-print 'Filing bug against package', package, 'to team', team
-
-# generate bug report
-mailbody = ''' affects ubuntu/%s
- subscribe %s
-
-%s
-''' % (package, team, diff)
-
-# sign it
-sign_command = 'gpg'
-if os.access('/usr/bin/gnome-gpg', os.X_OK):
- sign_command = 'gnome-gpg'
-
-gpg = subprocess.Popen([sign_command, '--clearsign'], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
-signed_mailbody = gpg.communicate(mailbody)[0]
-assert gpg.returncode == 0
-
-# generate email
-myemailaddr = os.getenv('DEBEMAIL')
-assert myemailaddr
-to = 'new@bugs.launchpad.net'
-
-mail = '''From: %s
-To: %s
-Subject: Please sponsor %s upload
-
-%s''' % (myemailaddr, to, package, signed_mailbody)
-
-s = smtplib.SMTP()
-s.connect()
-s.sendmail(myemailaddr, to, mail)
-s.close()
+++ /dev/null
-#!/bin/bash -e
-LOG=`svn diff debian/changelog| sed -rne '/^\+[[:blank:]]{2,}/{s/^\+ //; p}'`
-
-[ -n "$LOG" ] || {
- echo 'no debian/changelog change'
- exit 1
-}
-
-echo -- Log --
-echo "$LOG"
-echo ---------
-
-while read -p "Ok to commit? (Y/n) " -n 1 WHAT; do
- case "$WHAT" in
- y|Y|"")
- break
- echo "YES"
- ;;
- n|N)
- echo
- echo "Aborting."
- exit 0
- ;;
- *)
- echo " -- unknown response."
- ;;
- esac
-done
-
-svn commit -m "$LOG" "$@"
+++ /dev/null
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-import os, re, subprocess, sys
-
-def search_substr(f, str):
- for l in f:
- if l.find(str) >= 0:
- return l
-
- return None
-
-def get_price(str):
- str = str.replace(', ', ',')
- money_re = re.compile('^-?\d+,\d\d$')
- fields = str.split()
- fields.reverse()
- for f in fields:
- if money_re.match(f):
- return float(f.replace(',', '.'))
-
-def next_price(f, str):
- p = search_substr(f, str)
- if p:
- price = get_price(p)
- print 'next_price(%s) -> line "%s" -> %.2f' % (str, p.strip(), price)
- return price
- return None
-
-def print_price(p):
- ks = p.keys()
- ks.sort()
- for k in ks:
- print '%-30s: %10.2f €' % (k, p[k])
-
-if len(sys.argv) != 2:
- print 'Usage:', sys.argv[0], '<PDF file>'
- sys.exit(-1)
-
-pdfpath = sys.argv[1]
-txtpath = pdfpath[:-3] + 'txt'
-
-# create text file
-assert subprocess.call(['pdftotext', '-enc', 'UTF-8', '-layout', '-nopgbrk', pdfpath]) == 0
-
-try:
- f = open(txtpath)
-finally:
- os.unlink(txtpath) # so that we don't forget later
-
-price = {}
-
-common = next_price(f, 'Monatliche Beträge')
-#other = next_price(f, 'Sonstige Leistungen des Konzerns')
-#if other:
-# common = common + other
-bill_vat = next_price(f, 'Umsatzsteuer 19 %')
-bill_gross = next_price(f, 'Rechnungsbetrag')
-
-bill_item_re = re.compile('^\s*\d+\.\s*.*19')
-
-# Telekom
-assert search_substr(f, 'Summe Monatliche Beträge')
-assert search_substr(f, '...........')
-assert search_substr(f, '...........')
-
-for l in f:
- if l.find('..........') >= 0:
- break
-
- if bill_item_re.match(l):
- assert cur_number
- p = get_price(l)
- price[cur_number] = price.setdefault(cur_number, 0) + p
- print 'adding %.2f to %s for "%s"' % (p, cur_number, l.strip())
- if l.find('Summe Verbindungen für oben angegebene Rufnummer') >= 0:
- cur_number = None
- if l.find('Rufnummer (') >= 0:
- cur_number = l.strip().split(' ')[0].strip()
- print l.strip(), ' -> switching to', cur_number
-
-assert search_substr(f, '...........')
-
-# other companies
-if search_substr(f, 'Beträge anderer Anbieter'):
- for l in f:
- if l.find('Summe Beträge anderer Anbieter') >= 0:
- break
- if bill_item_re.match(l):
- assert cur_number
- p = get_price(l)
- print 'adding %.2f to %s for "%s"' % (p, cur_number, l.strip())
- price[cur_number] = price.setdefault(cur_number, 0) + p
- if l.find('Rufnummer (') >= 0:
- cur_number = l.strip().split(' ')[0].strip()
- print l.strip(), ' -> switching to', cur_number
-
-print '----------------------------------------'
-print 'Summen:'
-print_price(price)
-print 'Allgemeine Gebühren: %.2f' % common
-
-common = common / len(price)
-sum = 0
-for k, v in price.iteritems():
- price[k] = v + common
- sum = sum + price[k]
-
-print '----------------------------------------'
-print 'Verrechnung allgemeine Gebühren (Aufschlag für jeden: %.2f)' % common
-print_price(price)
-
-vat = sum * 0.19
-gross = sum + vat
-
-for k, v in price.iteritems():
- price[k] *= 1.19
-
-print '----------------------------------------'
-print 'Aufschlag Mehrwertsteuer:'
-print_price(price)
-
-print '----------------------------------------'
-print 'Berechnete MwST: %.3f, Rechnungs-MwSt: %.2f' % (vat, bill_vat)
-print 'Berechnete Bruttosume: %.3f, Rechnungs-Bruttosumme: %.2f' % (gross, bill_gross)
-