Merge topic 'update-third-party'
97149ff8
update-third-party: read attributes from the worktreea35f4be6
update-third-party: Add license noticeafac3d10
update-third-party: remove empty directories as well
This commit is contained in:
commit
030ec94780
|
@ -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.
|
# Script for updating third party packages.
|
||||||
#
|
#
|
||||||
|
@ -32,7 +48,7 @@
|
||||||
# Utility functions
|
# Utility functions
|
||||||
########################################################################
|
########################################################################
|
||||||
git_archive () {
|
git_archive () {
|
||||||
git archive --prefix="$name-reduced/" HEAD -- $paths | \
|
git archive --worktree-attributes --prefix="$name-reduced/" HEAD -- $paths | \
|
||||||
tar -C "$extractdir" -x
|
tar -C "$extractdir" -x
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,6 +101,7 @@ if [ -n "$basehash" ]; then
|
||||||
# Clear out the working tree
|
# Clear out the working tree
|
||||||
pushd "$extractdir"
|
pushd "$extractdir"
|
||||||
git ls-files | xargs rm -v
|
git ls-files | xargs rm -v
|
||||||
|
find . -type d -empty -delete
|
||||||
popd
|
popd
|
||||||
else
|
else
|
||||||
# Create a repo to hold this package's history
|
# Create a repo to hold this package's history
|
||||||
|
|
Loading…
Reference in New Issue