summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2009-09-19 21:31:09 +0200
committerFlorian Pritz <bluewind@xssn.at>2009-09-19 21:31:09 +0200
commitbe39c85dbb09e8e5666cde0728d55b5cb987abc1 (patch)
tree30fb30e487d5ea47980a386a56004de13ed4a9d4
parent690c198f98e843d5af0f7e5381bed6c0dc86518e (diff)
downloadaur-packages-be39c85dbb09e8e5666cde0728d55b5cb987abc1.tar.gz
aur-packages-be39c85dbb09e8e5666cde0728d55b5cb987abc1.tar.xz
upstream updates
Signed-off-by: Florian Pritz <bluewind@xssn.at>
-rw-r--r--ix/client77
-rw-r--r--vhba-module/PKGBUILD6
-rw-r--r--vhba-module/vhba-module.install3
3 files changed, 53 insertions, 33 deletions
diff --git a/ix/client b/ix/client
index 1dfd22c..1ba4da8 100644
--- a/ix/client
+++ b/ix/client
@@ -1,27 +1,40 @@
#!/usr/bin/env python
+'''
+[cat |] %prog [-g id | -d id | [-i id1 file1 .. -i idN fileN] file1 .. fileN]
+'''
-''' [cat |] %prog [-g id | -d id | [-i n1 id1 .. -i nN idN] file1 .. fileN] '''
+__version__ = '0.4'
-__version__ = '0.3'
+'''
+changes: 0.3
+ -i more intuitive (-i ID FILE instead of -i ID FILENUMBER)
+ prompt for filename and extension when interactive
+ support multiple -g
+ support multiple -d
+'''
import netrc, os, sys
def auth():
''' netrc: machine ix.io login USERNAME password TOKEN '''
try:
- auth = netrc.netrc().authenticators('ix.io')
+ creds = netrc.netrc().authenticators('ix.io')
except:
- return {}
- if not auth:
- return {}
- return {'login' : auth[0], 'token' : auth[2] }
+ return []
+ if not creds:
+ return []
+ return [('login', creds[0]), ('token', creds[2])]
-def mkreq(files, data={}, i=0):
+def mkreq(files, data=[], i=0):
for filename in files:
if filename is sys.stdin:
+ fname, ext = '', ''
if os.isatty(sys.stdin.fileno()):
+ fname = raw_input('filename: ').strip()
+ ext = raw_input('extension: ').strip()
+ if ext and not ext.startswith('.'):
+ ext = '.%s' % ext
print '^C to exit, ^D to send'
- fname, ext = '', ''
try:
contents = sys.stdin.read()
except KeyboardInterrupt:
@@ -35,9 +48,9 @@ def mkreq(files, data={}, i=0):
else:
continue
i += 1
- data['f:%d' % i] = contents
- data['name:%d' % i] = fname
- data['ext:%d' % i] = ext
+ data.append(('f:%d' % i, contents))
+ data.append(('name:%d' % i, fname))
+ data.append(('ext:%d' % i, ext))
return data
if __name__ == '__main__':
@@ -47,25 +60,35 @@ if __name__ == '__main__':
parser = OptionParser(version=__version__,
usage=__doc__,
description=auth.__doc__)
- parser.add_option('-g', '--get', help='get paste identified by ID')
- parser.add_option('-d', '--delete', help='delete paste identified by ID')
+ parser.add_option('-g', '--get', action='append',
+ help='get paste identified by ID')
+ parser.add_option('-d', '--delete', action='append',
+ help='delete paste identified by ID')
parser.add_option('-i', '--id', action='append', nargs=2,
- help='two params (N, ID) replace paste ID with file N')
+ help='two params: ID, FILE. replace paste ID with FILE' +
+ '. Use - if FILE is STDIN')
opts, args = parser.parse_args()
+
+
if opts.get:
- print urlopen('http://ix.io/%s' % (opts.get)).read().strip()
+ for i, get in enumerate(opts.get):
+ print urlopen('http://ix.io/%s' % (get)).read().strip()
+ if i < len(opts.get)-1:
+ print '-' * 79
else:
- if not args:
- args = [sys.stdin]
data = auth()
+ if opts.id:
+ for (idno, filename) in opts.id:
+ if filename == '-':
+ args.append(sys.stdin)
+ data.append(('id:%d' % len(args), idno))
+ elif os.path.exists(filename):
+ args.append(filename)
+ data.append(('id:%d' % len(args), idno))
if opts.delete:
- data['rm'] = opts.delete
- else:
- data.update(mkreq(args))
- if opts.id:
- for i in opts.id:
- try:
- data['id:%d' % int(i[0])] = i[1]
- except ValueError:
- parser.error('invalid file number "%s" in --id option' % i[0])
+ for i in opts.delete:
+ data.append(('rm', i))
+ elif not args:
+ args = [sys.stdin]
+ data.extend(mkreq(args))
print urlopen('http://ix.io', urlencode(data)).read().strip()
diff --git a/vhba-module/PKGBUILD b/vhba-module/PKGBUILD
index 5a291ca..1b63748 100644
--- a/vhba-module/PKGBUILD
+++ b/vhba-module/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD,v 1.5 2009/04/10 17:11:27 partition Exp $
+# $Id$
# Maintainer: Mateusz Herych <heniekk@gmail.com>
# Contributor: Charles Lindsay <charles@chaoslizard.org>
@@ -9,13 +9,13 @@ pkgdesc="Kernel module that emulates SCSI devices"
arch=('i686' 'x86_64')
url="http://cdemu.sourceforge.net/"
license=('GPL2')
-depends=('kernel26>=2.6.30' 'kernel26<2.6.31')
+depends=('kernel26>=2.6.31' 'kernel26<2.6.32')
install=vhba-module.install
source=(http://downloads.sourceforge.net/cdemu/$pkgname-$pkgver.tar.bz2)
md5sums=('a3b6ad798f2b72ef599df797ef79e5ec')
build() {
cd $startdir/src/$pkgname-$pkgver
- make -j1 KDIR=/usr/src/linux-`uname -r` || return 1
+ make KDIR=/usr/src/linux-`uname -r` || return 1
install -D vhba.ko $startdir/pkg/lib/modules/`uname -r`/extra/vhba.ko || return 1
}
diff --git a/vhba-module/vhba-module.install b/vhba-module/vhba-module.install
index eddff76..4f7e460 100644
--- a/vhba-module/vhba-module.install
+++ b/vhba-module/vhba-module.install
@@ -17,6 +17,3 @@ post_remove () {
depmod -a
}
-op=$1
-shift
-$op $*