diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-10-27 20:22:05 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-10-27 20:22:05 +0000 |
commit | 152371e19df0bcf4233895b9c41b906dbcdeaf9b (patch) | |
tree | a28b7a9e69683e64fce0374cc1bce67007d64a24 /BuildScripts | |
parent | 982c28eb83a3a834845f6f2f3fd6b36f1ca39be8 (diff) |
[Author: dmaclach]
Add SDEFCompiler to GTM. This is great for anyone working with SDEF files.
R=thomasvl
DELTA=39 (37 added, 0 deleted, 2 changed)
Diffstat (limited to 'BuildScripts')
-rwxr-xr-x | BuildScripts/SDEFCompiler.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/BuildScripts/SDEFCompiler.sh b/BuildScripts/SDEFCompiler.sh new file mode 100755 index 0000000..6a15b5c --- /dev/null +++ b/BuildScripts/SDEFCompiler.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# +# SDEFCompiler.sh +# +# Copyright 2009 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy +# of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +# +# Takes a file (usually with a suffix of .sdefsrc) and "compiles it" using +# xmllint to verify its correctness. Gets rid of a lot of the guesswork when +# trying to figure out what is wrong with your SDEF file. +# The best way to use SDEFCompiler is to add a custom build rule to your target +# in Xcode with the following settings: +# Process: "Source files with names matching:" "*.sdefsrc" +# using: "Custom script:" +# "Path/to/SDEFCompiler/relative/to/${SRCROOT}' +# with output files: +# ${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/${INPUT_FILE_BASE}.sdef + +set -o errexit +set -o nounset +set -o verbose + +xmllint --xinclude --valid --postvalid --format ${INPUT_FILE_PATH} > ${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/${INPUT_FILE_BASE}.sdef |