diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2021-02-25 22:08:56 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2021-02-26 19:11:14 +0300 |
commit | 6b56610e3ccb0bdfda8a58c9881564d119876673 (patch) | |
tree | f9d001a6e8e41ee0b015a3d23ab95d03263627fc /bdep-util/git-pre-commit-copyright-check.in | |
parent | 49421fe1e1abe88431427fb12f520452531a092f (diff) |
Convert bash functions that return arrays to comply with Bash Style Guide
Diffstat (limited to 'bdep-util/git-pre-commit-copyright-check.in')
-rw-r--r-- | bdep-util/git-pre-commit-copyright-check.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bdep-util/git-pre-commit-copyright-check.in b/bdep-util/git-pre-commit-copyright-check.in index 2e0f982..2dc2198 100644 --- a/bdep-util/git-pre-commit-copyright-check.in +++ b/bdep-util/git-pre-commit-copyright-check.in @@ -65,7 +65,7 @@ done current_year="$(date -u +'%Y')" for f in "${files[@]}"; do - year="$(sed -n -re 's%^Copyright( +\([cC]\))?[ 0-9,-]*[ ,-]([0-9]{4}).*$%\2%p' "$f" | head -n 1)" + year="$(sed -n -re 's%^Copyright( +\([cC]\))?[ 0-9,-]*[ ,-]([0-9]{4}).*$%\2%p' "$f" | sed -n -e '1p')" if [ -n "$year" -a "$year" != "$current_year" ]; then info "WARNING: last copyright year in '${f#./}' is $year" |