tools: licence.el: Minor change.

setup.py
Pierre-Antoine Rouby 2024-02-12 17:08:09 +01:00
parent deaf114fa3
commit e03ebedfdf
1 changed files with 16 additions and 12 deletions

View File

@ -85,18 +85,22 @@
(defun pamhyr-update-all-license ()
(interactive)
(let* ((root (pamhyr-root-dir))
(files-with-copyright (split-string
(shell-command-to-string
(format "git -C '%s' grep -e 'Copyright (C)'|cut -d ':' -f 1|uniq|grep [.]py"
root))
"\n"))
(files (split-string
(shell-command-to-string
(format "git -C '%s' ls-files | grep [.]py"
root))))
(files-without-copyright (seq-filter (lambda (file)
(not (member file files-with-copyright)))
files)))
(files-with-copyright
(split-string
(shell-command-to-string
(format "git -C '%s' grep -e 'Copyright (C)'|cut -d ':' -f 1|uniq|grep [.]py"
root))
"\n"))
(files
(split-string
(shell-command-to-string
(format "git -C '%s' ls-files | grep [.]py"
root))
"\n"))
(files-without-copyright
(seq-filter (lambda (file)
(not (member file files-with-copyright)))
files)))
(message (format "%s" files-with-copyright))
(mapcar 'pamhyr--update-license (mapcar (lambda (file) (concat root "/" file))
files-with-copyright))