1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
hipchat-emoticons-for-all/firefox/build-package.py

24 lines
624 B
Python
Raw Normal View History

import json
2015-08-20 19:28:20 +01:00
import os
current_dir = os.path.dirname(os.path.realpath(__file__)) + "/"
2015-08-20 19:28:20 +01:00
with open(current_dir + "../package.json") as json_file:
project_package = json.load(json_file)
2015-08-20 19:28:20 +01:00
with open(current_dir + "package.json") as json_file:
ext_package = json.load(json_file)
switcher = {
'name': 'title',
'version': 'version',
'description': 'description',
'author': 'author',
'license': 'license'
}
2015-08-20 19:28:20 +01:00
for key, value in switcher.items():
ext_package[value] = project_package[key]
2015-08-20 19:28:20 +01:00
with open(current_dir + 'package.json', 'w') as file:
json.dump(ext_package, file, indent=2, sort_keys=True)