-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwscript
33 lines (28 loc) · 1.02 KB
/
wscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#! /usr/bin/env python
APPNAME = 'gnome-shell-extension-aggregatemenu-hider'
VERSION = '3.4'
from csv import DictReader
def options(ctx):
configure(ctx)
def switch_to_package(option, opt_str, value, parser):
ctx.load('package', tooldir='.')
ctx.add_option("--package", action='callback', callback=switch_to_package,
help="generate files for AUR distribution instead of extension")
def configure(ctx):
ctx.load('template', tooldir='.')
ctx.load('gnu_dirs')
def build(ctx):
with open('extensions.csv') as f:
for extension in DictReader(f):
name = extension['name']
shortname = name.partition(' ')[0]
uuid = 'hide-' + shortname + '@' + extension['author']
ctx(source='extension.js.in metadata.json.in',
mapping={
'name': name,
'uuid': uuid,
'item': extension['item'],
'description': extension['description']},
name=shortname,
out_dir=uuid,
install_path='${DATAROOTDIR}/gnome-shell/extensions/' + uuid)