From d4a57539de6a2ee9b9bd43afffe54fe3aece65bf Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 23 Apr 2011 16:54:05 +0200 Subject: [PATCH] make build.py callable from other location --- tools/build/build.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 tools/build/build.py diff --git a/tools/build/build.py b/tools/build/build.py old mode 100644 new mode 100755 index 71603e45..91443525 --- a/tools/build/build.py +++ b/tools/build/build.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python +#vim: et:ts=4:sw=4:sts=4 import json import os import re @@ -27,6 +29,8 @@ def write_path(file): if path and not os.path.exists(path): os.makedirs(path) +os.chdir(os.path.dirname(__file__)) + source_path = '../../source/' build_path = '../../build/' @@ -70,4 +74,4 @@ for dirname, dirnames, filenames in os.walk(build_path + 'svg'): if filename[:1] != '.': files.append(os.path.join(dirname.replace(build_path, ''), filename)) -write_file(build_path + 'json/OxUI.json', json.dumps(files, indent=4, sort_keys=True)) \ No newline at end of file +write_file(build_path + 'json/OxUI.json', json.dumps(files, indent=4, sort_keys=True))