File indexing completed on 2024-05-12 04:22:07
0001 #!/bin/bash 0002 # SPDX-FileCopyrightText: none 0003 # SPDX-License-Identifier: CC0-1.0 0004 0005 fail() { 0006 echo "$0: $@" >&2 0007 exit 1 0008 } 0009 0010 year=$(date +%Y) 0011 copyright="$(git config --get user.name) <$(git config --get user.email)>" || fail "git config failed to get user data!" 0012 which reuse >/dev/null || fail "Reuse tool not installed! See https://reuse.software for information about the tool..." 0013 0014 if [[ "$#" -eq 0 ]] 0015 then 0016 echo "Usage: $0 FILE.." >&2 0017 echo "" >&2 0018 echo "Call 'reuse addheader' on the given files to update the copyright information with your name, email and the current year." >&2 0019 echo "" >&2 0020 exit 1 0021 fi 0022 0023 reuse addheader --year $year --copyright "$copyright" "$@"