Skip to content

Commit

Permalink
re-added license header files
Browse files Browse the repository at this point in the history
Signed-off-by: Natalia Luzuriaga <[email protected]>
  • Loading branch information
natalialuzuriaga committed Aug 2, 2024
1 parent b30ec90 commit ec08a1c
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 0 deletions.
81 changes: 81 additions & 0 deletions example-spdx-headers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# SPDX License Headers for CC0 1.0 Universal in the top 20 programming languages

## JavaScript

`// SPDX-License-Identifier: CC0-1.0`

## Python

`# SPDX-License-Identifier: CC0-1.0`

## Java

`/* SPDX-License-Identifier: CC0-1.0 */`

## C++

`/* SPDX-License-Identifier: CC0-1.0 */`

## Ruby

`# SPDX-License-Identifier: CC0-1.0`

## PHP

`<?php // SPDX-License-Identifier: CC0-1.0 ?>`

## C\#

`// SPDX-License-Identifier: CC0-1.0`

## Go

`// SPDX-License-Identifier: CC0-1.0`

## TypeScript

`// SPDX-License-Identifier: CC0-1.0`

## Swift

`// SPDX-License-Identifier: CC0-1.0`

## Objective-C

`// SPDX-License-Identifier: CC0-1.0`

## Shell

`# SPDX-License-Identifier: CC0-1.0`

## Kotlin

`/* SPDX-License-Identifier: CC0-1.0 */`

## R

`# SPDX-License-Identifier: CC0-1.0`

## Scala

`/* SPDX-License-Identifier: CC0-1.0 */`

## Lua

`-- SPDX-License-Identifier: CC0-1.0`

## Perl

`# SPDX-License-Identifier: CC0-1.0`

## Haskell

`-- SPDX-License-Identifier: CC0-1.0`

## Groovy

`/* SPDX-License-Identifier: CC0-1.0 */`

## Rust

`// SPDX-License-Identifier: CC0-1.0`
18 changes: 18 additions & 0 deletions insert_license_headers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# SPDX-License-Identifier: CC0-1.0
#
# This script inserts an SPDX license header at the top of all files in a Git repository
# that do not already have the header.
#
# Usage: ./insert_license_headers.sh

LICENSE_HEADER="// SPDX-License-Identifier: CC0-1.0"

for file in $(git ls-files); do
if [ $(head -n 1 $file) != $LICENSE_HEADER ]; then
echo "Inserting license header into $file"
(echo $LICENSE_HEADER; cat $file) > /tmp/file
mv /tmp/file $file
fi
done

0 comments on commit ec08a1c

Please sign in to comment.