bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New license headers


From: Ludovic Courtès
Subject: New license headers
Date: Sun, 06 Jan 2013 00:53:17 +0100
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux)

Hi,

I’ve changed license headers to read “GNU Guix” and to use the copyright
sign using this script:

(use-modules (guix build utils)
             (srfi srfi-1))

(fluid-set! %default-port-encoding "UTF-8")

(substitute* (remove (lambda (f)
                       (or (string-contains f ".tar.")
                           (string-contains f ".git/")
                           (string-contains f ".so")
                           (string-suffix? ".o" f)
                           (string-suffix? ".a" f)
                           (string-suffix? ".go" f)
                           (string-suffix? ".pdf" f)
                           (string-suffix? ".png" f)
                           (string-suffix? ".info" f)
                           (equal? (basename f) "guix-daemon")
                           (equal? (basename f) "nix-setuid-helper")
                           (string-contains f "nix-upstream/")
                           (string-contains f "distro/packages/bootstrap/")))
                     (find-files "." "\\.[a-z]+$"))
  (("^([[:graph:]]+) This file is part of Guix." _ comment-start)
   (string-append comment-start " This file is part of GNU Guix."))
  (("^([[:graph:]]+) Guix --- Nix package management.*" _ comment-start)
   (string-append comment-start
                  " GNU Guix --- Functional package management for GNU\n"))
  (("^([[:graph:]]+) Guix is " _ comment-start)
   (string-append comment-start " GNU Guix is "))
  (("^([[:graph:]]+) along with Guix." _ comment-start)
   (string-append comment-start " along with GNU Guix."))
  (("^([[:graph:]]+) Copyright \\(C\\)" _ comment-start)
   (string-append comment-start " Copyright ©")))
Notice how find + sed look old-fashioned and clunky in comparison.  ;-)

Thanks,
Ludo’.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]