summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-02-07 07:24:41 (GMT)
committerBoris Kolpackov <boris@codesynthesis.com>2019-02-07 07:24:41 (GMT)
commitdea86ebba475913a2dec2024514c91d5908f28d9 (patch)
tree274f9c659f22f34ab787fa8f7ad730b7c7aeb315
parent7b526508b0a090173f982c9c86d79b0d2bf5b453 (diff)
Remove old and no longer used copyright update script
-rwxr-xr-xcopyright88
1 files changed, 0 insertions, 88 deletions
diff --git a/copyright b/copyright
deleted file mode 100755
index eb59d24..0000000
--- a/copyright
+++ /dev/null
@@ -1,88 +0,0 @@
-#! /usr/bin/env bash
-
-# Manage build2 toolchain copyright.
-#
-# NOTES:
-#
-# 1. Update the style submodule first.
-# 2. Check if any new submodules that need to be excluded (below).
-# 3. After first run, regenerate docs, and run again.
-# 4. Review changes before committing.
-#
-# Usage: copyright
-#
-usage="usage: $0"
-
-old=2016
-new=2017
-
-# In extras we just grep for the old date.
-#
-modules="libbutl build2 libbpkg bpkg brep build2-toolchain msvc-linux"
-extras="etc private"
-
-owd=`pwd`
-trap "{ cd $owd; exit 1; }" ERR
-set -o errtrace # Trap in functions.
-
-function info () { echo "$*" 1>&2; }
-function error () { info "$*"; exit 1; }
-
-
-# In-place sed.
-#
-function ised () # <regex> <file>
-{
- local r=$1
- local f=$2
- local o=$f.ised-orig
-
- mv $f $o
- cp -p $o $f # Keep owner, permissions.
-
- if ! sed -e "$r" $o >$f; then
- mv $o $f
- return 1
- fi
-
- if cmp -s $o $f; then
- mv $o $f
- else
- rm $o
- fi
-}
-
-for m in $modules; do
- # Top-level directories inside the module to exclude.
- #
- exclude=.git
-
- # Exclude submodules.
- #
- if [ $m = "build2" ]; then
- exclude="$exclude config"
- elif [ $m = "build2-toolchain" ]; then
- exclude="$exclude bpkg build2 libbutl libbpkg"
- fi
-
- fo=
- if [ "$exclude" ]; then
- fo="-type d ("
- for e in $exclude; do
- fo="$fo -path $m/$e -o"
- done
- fo="$fo -false ) -prune -o"
- fi
- fo="$fo -type f -print"
-
- for f in `find $m $fo`; do
- ised "s/\(Copyright (c) [0-9]*\)-$old \(Code Synthesis\)/\1-$new \2/" $f
- grep --color=auto --with-filename $old $f || true
- done
-done
-
-for m in $extras; do
- for f in `find $m -type d -path $m/.git -prune -o -type f -print`; do
- grep --color=auto --with-filename $old $f || true
- done
-done