savannah-cvs
[Top][All Lists]
Advanced

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

[Savannah-cvs] [734] add fsf license header automation function


From: iank
Subject: [Savannah-cvs] [734] add fsf license header automation function
Date: Wed, 3 Jan 2024 05:21:31 -0500 (EST)

Revision: 734
          
http://svn.savannah.gnu.org/viewvc/?view=rev&root=administration&revision=734
Author:   iank
Date:     2024-01-03 05:21:30 -0500 (Wed, 03 Jan 2024)
Log Message:
-----------
add fsf license header automation function

Modified Paths:
--------------
    trunk/sviki/fsf.mdwn

Modified: trunk/sviki/fsf.mdwn
===================================================================
--- trunk/sviki/fsf.mdwn        2024-01-03 10:17:27 UTC (rev 733)
+++ trunk/sviki/fsf.mdwn        2024-01-03 10:21:30 UTC (rev 734)
@@ -77,3 +77,35 @@
 
 Info on volunteering with the FSF tech team:
 <https://libreplanet.org/wiki/Group:FSF:Tech_Team_Volunteers>
+
+```
+# Function to add standard copyright header to file, easier than
+# copy/pasting. If you copy this and don't work for FSF, change the
+# copyright holder to you or your employer depending on your situation.
+
+fsf-sv-header() {
+local f
+if ! type -p sponge &>/dev/null; then
+  echo "$0: error: missing dependency: sudo apt install moreutils" >&2
+  return 1
+fi
+
+for f; do
+  echo "adding header to $f"
+  cat <<EOF | sponge "$f"
+The following is the GNU All-permissive License as recommended in
+<https://www.gnu.org/licenses/license-recommendations.en.html>
+
+Copyright (C) $(date +%Y) Free Software Foundation <sysadmin@fsf.org>
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without any warranty.
+
+Contributions are welcome. See <https://savannah.gnu.org/maintenance/fsf/>.
+
+EOF
+done
+}
+```




reply via email to

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