Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/releng
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2019-06-07 12:53:11 -0400
committerHenrik Rentz-Reichert2019-06-07 12:53:11 -0400
commit2f0bd26685540086e59577b80cd3a5aac6711ce9 (patch)
treeaf72dff7a4337b9fe3465f1e2f8e2a1c93c61cea /releng
parentc552cb89667441d30e98da100d1e543070e878bd (diff)
downloadorg.eclipse.etrice-2f0bd26685540086e59577b80cd3a5aac6711ce9.tar.gz
org.eclipse.etrice-2f0bd26685540086e59577b80cd3a5aac6711ce9.tar.xz
org.eclipse.etrice-2f0bd26685540086e59577b80cd3a5aac6711ce9.zip
Bug 538027 - switching from EPL-1.0 to EPL-2.0
Also C and C++ sources Change-Id: I99e2b19c0c7ea1ad120535e92a99d6fb18ec4ef0
Diffstat (limited to 'releng')
-rw-r--r--releng/org.eclipse.etrice.releng/scripts/changelicToEPL2.0-c-sources.sh59
1 files changed, 59 insertions, 0 deletions
diff --git a/releng/org.eclipse.etrice.releng/scripts/changelicToEPL2.0-c-sources.sh b/releng/org.eclipse.etrice.releng/scripts/changelicToEPL2.0-c-sources.sh
new file mode 100644
index 000000000..375cf4806
--- /dev/null
+++ b/releng/org.eclipse.etrice.releng/scripts/changelicToEPL2.0-c-sources.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+# Copyright (c) 2018 - Compex Systemhaus GmbH (69115 Heidelberg, Germany)
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License 2.0 which is available at
+# http://www.eclipse.org/legal/epl-2.0.
+#
+# SPDX-License-Identifier: EPL-2.0
+#
+# Contributors:
+# Ralf Mollik, Compex Systemhaus GmbH - initial contribution
+# Henrik Rentz-Reichert for eTrice
+#
+# Migrate a project from EPL 1.0 to EPL 2.0
+# This script worked fine on eTrice
+#
+
+#git pull
+
+for f in `find . -name "*.c" -or -name "*.cpp" -or -name "*.h"`
+do
+ if [ ! -f $f ]
+ then
+ continue
+ fi
+ echo .
+ echo update $f
+ sed -b -i 's/Eclipse Public License v1.0/Eclipse Public License 2.0/g' $f
+ sed -b -i -E '1,40s/(<!--)([[:blank:]]*[^[:blank:]])*([[:blank:]]*)http:\/\/www.eclipse.org\/legal\/epl-v10.html(.*)/\1\2\3https:\/\/www.eclipse.org\/legal\/epl-2.0\/ \4\
+\1\2\3 \4\
+\1\2\3SPDX-License-Identifier: EPL-2.0 \4/' $f
+ sed -b -i -E '1,40s/([[:blank:]]*[^[:blank:]])*([[:blank:]]*)http:\/\/www.eclipse.org\/legal\/epl-v10.html(.*)/\1\2https:\/\/www.eclipse.org\/legal\/epl-2.0\/\3\
+\1\3\
+\1\2SPDX-License-Identifier: EPL-2.0\3/' $f
+done
+
+for f in `find . -name "epl-v10.html"`
+do
+ echo .
+ rm $f
+ newname=${f/epl-v10.html/}epl-2.0.html
+ echo update $f to $newname
+ curl https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html -o $newname
+
+ buildprops=${f/epl-v10.html/}build.properties
+ if [ -e $buildprops ]
+ then
+ sed -b -i 's/epl-v10.html/epl-2.0.html/g' $buildprops
+ fi
+ pom=${f/epl-v10.html/}pom.xml
+ if [ -e $pom ]
+ then
+ sed -b -i 's/epl-v10.html/epl-2.0.html/g' $pom
+ fi
+done
+
+
+
+

Back to the top