Adding the patch2zip command file. default tip
authorMarijn Vriens <m.vriens@metronomo.cl>
Thu Jun 25 12:38:07 2009 +0200 (2009-06-25)
changeset 18d452811bb488
parent 17 78ac4c43fa3e
Adding the patch2zip command file.
patch2zip
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patch2zip	Thu Jun 25 12:38:07 2009 +0200
     1.3 @@ -0,0 +1,17 @@
     1.4 +#!/usr/bin/env python
     1.5 +
     1.6 +import sys
     1.7 +import subprocess
     1.8 +
     1.9 +patchName = sys.argv[1]
    1.10 +zipName = patchName.rsplit('.', 1)[0]+".zip"
    1.11 +
    1.12 +fd = open(patchName, 'r')
    1.13 +cmd = ['zip', zipName]
    1.14 +for line in fd.readlines():
    1.15 +    if line.startswith('diff '):
    1.16 +        cmd.append(line.split()[-1][2:])
    1.17 +subprocess.call(cmd)
    1.18 +
    1.19 +
    1.20 +