Skip to content

Commit

Permalink
fix unused
Browse files Browse the repository at this point in the history
  • Loading branch information
BenediktMKuehne committed Feb 28, 2024
1 parent 01c6eaa commit be5c5f9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dev-tools/write-header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

# Description: Helper script to get our Copyright things in order

YEAR=2024

RED='\033[0;31m'
# RED='\033[0;31m'
GREEN='\033[0;32m'
ORANGE='\033[0;33m'
BOLD='\033[1m'
Expand Down Expand Up @@ -41,17 +39,19 @@ write_headers(){
continue
fi

local STARTYEAR="$(git log --follow --format=%ad --date default "${FILE_}" | tail -1 | cut -d ' ' -f 5)"
local COPYRIGHT_HEADER="__copyright__ = 'Copyright ${STARTYEAR}-${YEAR} Siemens Energy AG'"
local STARTYEAR=""
local COPYRIGHT_HEADER="__copyright__ = 'Copyright ${STARTYEAR}-${YEAR_} Siemens Energy AG'"
local AUTHOR_ARR=()
local AUTHOR_HEADER="__author__ = '"
local LICENSE_HEADER="__license__ = 'MIT'"

readarray -t AUTHOR_ARR < <(git shortlog -n -s "${FILE_}" 2>/dev/null | sort -gr | cut -c 8- ) # gets commit count for file/folder
AUTHOR_ARR=( "${AUTHOR_ARR[@]/%/,}" )
AUTHOR_HEADER+="${AUTHOR_ARR[@]}"
AUTHOR_HEADER+="${AUTHOR_ARR[]}"
AUTHOR_HEADER="${AUTHOR_HEADER%?}'"

STARTYEAR="$(git log --follow --format=%ad --date default "${FILE_}" | tail -1 | cut -d ' ' -f 5)"

echo "debug-print \$\{\#AUTHOR_ARR\[\@\]\} ${#AUTHOR_ARR[@]}"
echo "debug-print \$\{AUTHOR_ARR\[\*\]\} ${AUTHOR_ARR[*]}"
if [[ "${#AUTHOR_ARR[@]}" -eq 1 && ! "${AUTHOR_ARR[*]}" =~ "Benedikt" ]]; then
Expand Down

0 comments on commit be5c5f9

Please sign in to comment.