summaryrefslogtreecommitdiffstats
path: root/tools/gen_keyboard_overlay_data
diff options
context:
space:
mode:
authormazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-16 03:57:28 +0000
committermazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-16 03:57:28 +0000
commite248326f0be8031180f404c927689e0512a55789 (patch)
tree30e7915bc5c72ee6ee85a7e61d28b901bfddd3b9 /tools/gen_keyboard_overlay_data
parent3f0bdcc34f0b3fbd32080e2083d62933dd48a576 (diff)
downloadchromium_src-e248326f0be8031180f404c927689e0512a55789.zip
chromium_src-e248326f0be8031180f404c927689e0512a55789.tar.gz
chromium_src-e248326f0be8031180f404c927689e0512a55789.tar.bz2
Improve gen_keyboard_overlay_data.py.
Changed the script as follows. - Change the default output directory of the JS file. - Mention application specific password explicitly - Print warning if the file does not exist in the output destination. BUG=None TEST=Manual Review URL: http://codereview.chromium.org/8937025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114767 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gen_keyboard_overlay_data')
-rwxr-xr-xtools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py b/tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py
index 9860bd7..7be6f29 100755
--- a/tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py
+++ b/tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py
@@ -51,7 +51,7 @@ CC_OUTDIR = 'chrome/browser/ui/webui/chromeos'
CC_FILENAME = 'keyboard_overlay_ui.cc'
GRD_OUTDIR = 'chrome/app'
GRD_FILENAME = 'generated_resources.grd'
-JS_OUTDIR = 'chrome/browser/resources'
+JS_OUTDIR = 'chrome/browser/resources/chromeos'
JS_FILENAME = 'keyboard_overlay_data.js'
ALTGR_OUTDIR = 'chrome/browser/chromeos/input_method'
ALTGR_FILENAME = 'xkeyboard.cc'
@@ -291,7 +291,8 @@ def ParseOptions():
# Get the password from the terminal, if needed.
if not options.password:
- options.password = getpass.getpass('Password for %s: ' % options.username)
+ options.password = getpass.getpass(
+ 'Application specific password for %s: ' % options.username)
return options
@@ -439,7 +440,10 @@ def UniqueBehaviors(hotkey_data):
def GetPath(path_from_src):
"""Returns the absolute path of the specified path."""
- return os.path.join(os.path.dirname(__file__), '../..', path_from_src)
+ path = os.path.join(os.path.dirname(__file__), '../..', path_from_src)
+ if not os.path.isfile(path):
+ print 'WARNING: %s does not exist. Maybe moved or renamed?' % path
+ return path
def OutputJson(keyboard_glyph_data, hotkey_data, layouts, var_name, outdir):