From 1a6723cba95db9c67d42c567d3e327f1e4637c0c Mon Sep 17 00:00:00 2001 From: "martin@piware.de" <> Date: Mon, 8 Mar 2010 18:13:15 +0100 Subject: [PATCH] drop some obsolete scripts --- amberfiles | 49 ------------------------------------ dsrc-new-patch | 28 --------------------- vcard2gnokii | 67 -------------------------------------------------- 3 files changed, 144 deletions(-) delete mode 100755 amberfiles delete mode 100755 dsrc-new-patch delete mode 100755 vcard2gnokii diff --git a/amberfiles b/amberfiles deleted file mode 100755 index 82ebd87..0000000 --- a/amberfiles +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/python - -import sys, os, os.path, md5 - -mirror = "http://security.ubuntu.com/ubuntu/" - -if len(sys.argv) < 2: - print "Usage:", sys.argv[0], " []" - sys.exit(1) - -# arch -> name -> (size,md5) -files = {} - -if len(sys.argv) > 2: - version = sys.argv[2] -else: - version = None - -for f in os.listdir(sys.argv[1]): - if version and f.find(version) < 0: - continue - - path=os.path.join(sys.argv[1], f) - if os.path.isfile(path): - m = md5.new() - m.update(open(path, "r").read()) - data = (os.path.getsize(path), m.hexdigest()) - - if f.find("i386.deb") > 0: - files.setdefault("i386 architecture (x86 compatible Intel/AMD)", {})[path] = data - elif f.find("powerpc.deb") > 0: - files.setdefault("powerpc architecture (Apple Macintosh G3/G4/G5)", {})[path] = data - elif f.find("amd64.deb") > 0: - files.setdefault("amd64 architecture (Athlon64, Opteron, EM64T Xeon)", {})[path] = data - elif f.find("all.deb") > 0: - files.setdefault("Architecture independent packages:", {})[path] = data - elif (f.find("tar.gz") > 0) or (f.find("diff.gz") > 0) or (f.find(".dsc") > 0): - files.setdefault("Source archives:", {})[path] = data - else: - print >> sys.stderr, "Ignoring unknown file", path - -for arch, filemap in files.iteritems(): - print " ", arch - print - for name, (size, md5) in files[arch].iteritems(): - print " ", mirror + name - print " Size/MD5: ", size, md5 - - print diff --git a/dsrc-new-patch b/dsrc-new-patch deleted file mode 100755 index 8b26f68..0000000 --- a/dsrc-new-patch +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -e - -[ -n "$1" ] -[ -e debian/rules ] -[ -d debian/patches ] -[ ! -e debian/patches/$1 ] - -CWD=`pwd` -D=`mktemp -d` -trap "rm -rf $D" 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 - -debclean -cp -r . $D/orig -cd $D/orig -debian/rules setup || debian/rules patch || debian/rules apply-patches || debian/rules apply-dpatches || debian/rules unpack || debian/rules patch-stamp -[ -z "`find -name '*.rej'`" ] || { - echo 'there are rejections from the current patches, aborting' >&2 - exit 1 -} -find -name '*.orig' | xargs rm || true -cd .. -cp -a orig new -cd new -echo 'make your modifications in this shell and exit it successfully' -bash -find -name '*.orig' | xargs rm || true -cd .. -diff -Nurp orig new > "$CWD/debian/patches/$1" diff --git a/vcard2gnokii b/vcard2gnokii deleted file mode 100755 index f3cef82..0000000 --- a/vcard2gnokii +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/python - -import sys - -def output_info(info, pos): - if info.has_key('X-EVOLUTION-FILE-AS'): - result = info['X-EVOLUTION-FILE-AS'] - elif info.has_key('N'): - name_comp = info['N'].split(';') - result = '%s\, %' % (name_comp[0], ' '.join([c for c in name_comp[1:] if c])) - else: - print >> sys.stderr, 'No suitable name for', info - return - - result += ';;ME;%i;5' % pos - - id = 0 - - for k, v in info.iteritems(): - kf = k.split(';') - type = 0 - if len(kf) > 1: - if 'TYPE=HOME' in k: - type = 2 - elif 'TYPE=CELL' in k: - type = 3 - elif 'TYPE=WORK' in k: - type = 6 - - if kf[0] == 'ADR': - # current gnokii does not swallow type "9" (postal address) - result += ';10;0;%i;%s' % (id, '\\n'.join([f for f in v.split(';') if f])) - elif kf[0] == 'EMAIL': - result += ';8;%i;%i;%s' % (type, id, v) - elif kf[0] == 'TEL': - result += ';11;%i;%i;%s' % (type, id, v) - elif kf[0] == 'BDAY': - result += (';10;0;%i;BDAY: ' %id) + v - else: - continue - - id += 1 - - print result - -pos = 1 -info = {} -for line in open(sys.argv[1]): - if not line or line[0] == ' ': - continue - line = line.strip() - if not line: - continue - try: - (key, value) = line.split(':', 1) - except ValueError: - print >> sys.stderr, 'ignoring invalid line:', line - continue - value = value.strip() - if value == 'VCARD': - if key == 'BEGIN': - info = {} - elif key == 'END': - output_info(info, pos) - pos += 1 - if value: - info[key] = value.strip() -- 2.39.2