tfa-next: fix copyright check script for TF-A

Commit 1150fb80 ("tfa-next: adapt for Rusted Copyright") enhanced the
TF-A copyright check script so that it can also check the copyright
style we use in the RF-A project. However, in the process, it broke the
script for TF-A.

What happens is that when we run the script for the TF-A code base, we
only pass it one argument - the path to the directoty to scan. However,
the script still expects a second argument, which it captures in the
COPYRIGHT_FLAGS variable. In the case of TF-A, $COPYRIGHT_FLAGS ends up
being the empty string.

Later when we invoke the check-copyright.py helper script, we pass it
the copyright flags as a string. For TF-A, this means we end up invoking
the script like that:

$ check-copyright.py --tree "/path/to/tfa" "" --patch # ...

Note the "" extra argument passed in between --tree and --patch, which
gets rejected by check-copyright.py ("error: unrecognized arguments").

To fix this, stop quoting the copyright flags variable in the
check_copyright.py script invokation. The resulting behaviour is as
expected:
- (TF-A case) If COPYRIGHT_FLAGS is the empty string, $COPYRIGHT_FLAGS
  "disappears" entirely.
- (RF-A case) If COPYRIGHT_FLAGS is --rusted, it gets correctly passed
  to check_copyright.py.

Signed-off-by: Sandrine Afsa <sandrine.afsa@arm.com>
Change-Id: I4e016d353eb3a8878534840732725cbe9a0ee70f
1 file changed