blob: e31dfb9929165ee741000eb123b9cca95004e0d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/bash
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
tmp=$(mktemp)
trap "rm -f $tmp" EXIT
git diff --name-only $(git cl upstream)... | while read file; do
cp "$file" "$tmp"
# Rather than editing the temporary file, edit the original file in-place
# so that we preserve file modes.
sed -i -e '1,4s/Copyright .c. .* The Chromium Authors/Copyright (c) 2011 The Chromium Authors/' "$file"
if ! diff -q "$file" "$tmp" > /dev/null; then
echo "updated $file"
fi
done
|