mirror of https://gitlab.com/pamhyr/pamhyr2
tools: licence.el: Minor change.
parent
deaf114fa3
commit
e03ebedfdf
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue