aboutsummaryrefslogtreecommitdiff
path: root/BuildScripts
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-10-27 22:33:54 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-10-27 22:33:54 +0000
commit24322f87faace9ffabe0787dbfb27eeeea9aed31 (patch)
tree86527dfe76206b4923e9766944d887e89c0519e8 /BuildScripts
parent152371e19df0bcf4233895b9c41b906dbcdeaf9b (diff)
[Author: thomasvl]
Since xcode 3.2 like to be really chatty in the build window, turn off verbose. Support two arguments for input and output or defaults that should work with the Xcode rule support. Exec xmlint so the error code comes back. R=dmaclach DELTA=18 (13 added, 2 deleted, 3 changed)
Diffstat (limited to 'BuildScripts')
-rwxr-xr-xBuildScripts/SDEFCompiler.sh21
1 files changed, 16 insertions, 5 deletions
diff --git a/BuildScripts/SDEFCompiler.sh b/BuildScripts/SDEFCompiler.sh
index 6a15b5c..ae96556 100755
--- a/BuildScripts/SDEFCompiler.sh
+++ b/BuildScripts/SDEFCompiler.sh
@@ -1,7 +1,6 @@
#!/bin/sh
-#
# SDEFCompiler.sh
-#
+
# Copyright 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -15,7 +14,7 @@
# 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.
@@ -29,6 +28,18 @@
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
+if [[ $# -ne 2 && $# -ne 0 ]] ; then
+ echo "usage: ${0} INPUT OUTPUT" >&2
+ exit 1
+fi
+
+if [[ $# -eq 2 ]] ; then
+ SCRIPT_INPUT_FILE="${1}"
+ SCRIPT_OUTPUT_FILE="${2}"
+else
+ SCRIPT_INPUT_FILE="${INPUT_FILE_PATH}"
+ SCRIPT_OUTPUT_FILE="${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/${INPUT_FILE_BASE}.sdef"
+fi
+
+exec xmllint --xinclude --valid --postvalid --format "${SCRIPT_INPUT_FILE}" > "${SCRIPT_OUTPUT_FILE}"