aboutsummaryrefslogtreecommitdiff
path: root/build/tools
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2009-06-30 10:51:41 +0200
committerDavid 'Digit' Turner <digit@google.com>2009-06-30 10:51:41 +0200
commit849a5c1101965b920b49a5620511661bf6870062 (patch)
tree0dbfd8f9ecc851a14ce82c456c0af9567201cdf3 /build/tools
parent31ab66466eaac85ebb0243d7df43d5082a3fd154 (diff)
downloadndk-849a5c1101965b920b49a5620511661bf6870062.tar.gz
Remove problematic case-insensitive duplicate files.
Add missing copyright/license disclaimer to build/tools/make-release.sh Add a new tool: build/tools/find-case-duplicates.sh
Diffstat (limited to 'build/tools')
-rwxr-xr-xbuild/tools/find-case-duplicates.sh43
-rwxr-xr-xbuild/tools/make-release.sh14
2 files changed, 57 insertions, 0 deletions
diff --git a/build/tools/find-case-duplicates.sh b/build/tools/find-case-duplicates.sh
new file mode 100755
index 000000000..c5129e8e2
--- /dev/null
+++ b/build/tools/find-case-duplicates.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# Copyright (C) 2009 The Android Open Source Project
+#
+# 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.
+#
+
+# This script is used to find case-insensitive duplicate file names
+# from the git repository. This is used to remove them when generating
+# a new sysroot.
+
+# location of the root ndk directory. we assume this script is under build/tools
+NDK_ROOT_DIR=`dirname $0`/../..
+NDK_ROOT_DIR=`cd $NDK_ROOT_DIR && pwd`
+
+ORG_FILES=`(cd $NDK_ROOT_DIR && git ls-files) | sort -f`
+NEW_FILES=
+
+PREVFILE=
+PREVUPFILE=XXXXXX
+for FILE in $ORG_FILES; do
+ # don't use [:lower:] and [:upper:] since they can produce
+ # strange results based on the current locale.
+ UPFILE=`echo $FILE | tr [a-z] [A-Z]`
+ if [ "$UPFILE" != "$PREVUPFILE" ] ; then
+ NEW_FILES="$NEW_FILES $FILE"
+ else
+ echo "$PREVFILE"
+ echo "$FILE"
+ fi
+ PREVFILE=$FILE
+ PREVUPFILE=$UPFILE
+done
diff --git a/build/tools/make-release.sh b/build/tools/make-release.sh
index 0eae2ca38..f2b969737 100755
--- a/build/tools/make-release.sh
+++ b/build/tools/make-release.sh
@@ -1,5 +1,19 @@
#!/bin/sh
#
+# Copyright (C) 2009 The Android Open Source Project
+#
+# 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.
+#
# This script is used to build complete Android NDK release packages
# from the git repository and a set of prebuilt cross-toolchain tarballs
#