summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Utilities/Scripts/update-third-party.bash19
1 files changed, 18 insertions, 1 deletions
diff --git a/Utilities/Scripts/update-third-party.bash b/Utilities/Scripts/update-third-party.bash
index 8925296cb2..6aeeccd1b1 100644
--- a/Utilities/Scripts/update-third-party.bash
+++ b/Utilities/Scripts/update-third-party.bash
@@ -1,3 +1,19 @@
+#=============================================================================
+# Copyright 2015-2016 Kitware, 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.
+#=============================================================================
+
########################################################################
# Script for updating third party packages.
#
@@ -32,7 +48,7 @@
# Utility functions
########################################################################
git_archive () {
- git archive --prefix="$name-reduced/" HEAD -- $paths | \
+ git archive --worktree-attributes --prefix="$name-reduced/" HEAD -- $paths | \
tar -C "$extractdir" -x
}
@@ -85,6 +101,7 @@ if [ -n "$basehash" ]; then
# Clear out the working tree
pushd "$extractdir"
git ls-files | xargs rm -v
+ find . -type d -empty -delete
popd
else
# Create a repo to hold this package's history