Commit e03ebedf authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

tools: licence.el: Minor change.

Showing with 16 additions and 12 deletions
+16 -12
...@@ -85,18 +85,22 @@ ...@@ -85,18 +85,22 @@
(defun pamhyr-update-all-license () (defun pamhyr-update-all-license ()
(interactive) (interactive)
(let* ((root (pamhyr-root-dir)) (let* ((root (pamhyr-root-dir))
(files-with-copyright (split-string (files-with-copyright
(shell-command-to-string (split-string
(format "git -C '%s' grep -e 'Copyright (C)'|cut -d ':' -f 1|uniq|grep [.]py" (shell-command-to-string
root)) (format "git -C '%s' grep -e 'Copyright (C)'|cut -d ':' -f 1|uniq|grep [.]py"
"\n")) root))
(files (split-string "\n"))
(shell-command-to-string (files
(format "git -C '%s' ls-files | grep [.]py" (split-string
root)))) (shell-command-to-string
(files-without-copyright (seq-filter (lambda (file) (format "git -C '%s' ls-files | grep [.]py"
(not (member file files-with-copyright))) root))
files))) "\n"))
(files-without-copyright
(seq-filter (lambda (file)
(not (member file files-with-copyright)))
files)))
(message (format "%s" files-with-copyright)) (message (format "%s" files-with-copyright))
(mapcar 'pamhyr--update-license (mapcar (lambda (file) (concat root "/" file)) (mapcar 'pamhyr--update-license (mapcar (lambda (file) (concat root "/" file))
files-with-copyright)) files-with-copyright))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment