Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/releng
diff options
context:
space:
mode:
authorJonah Graham2018-11-19 13:41:21 +0000
committerJonah Graham2018-11-20 21:22:12 +0000
commitcd612527368a2be6f7d4db1e2fbc1f8bd53f5aaf (patch)
treea56c69c8b693b58cc9dd6ecceb710343613f9c92 /releng
parent48d2271a58a68743e428d3096d2bca054d04e310 (diff)
downloadorg.eclipse.cdt-cd612527368a2be6f7d4db1e2fbc1f8bd53f5aaf.tar.gz
org.eclipse.cdt-cd612527368a2be6f7d4db1e2fbc1f8bd53f5aaf.tar.xz
org.eclipse.cdt-cd612527368a2be6f7d4db1e2fbc1f8bd53f5aaf.zip
Bug 540371: Script for updating to EPLv2
Script based on work done by Lars Vogel on Eclipse Platform. See https://git.eclipse.org/r/#/c/127598/ Change-Id: Ic8d04a20c955179645fdeeb11cb3861d7b31fa3f
Diffstat (limited to 'releng')
-rwxr-xr-xreleng/scripts/change_to_eplv2.sh46
1 files changed, 46 insertions, 0 deletions
diff --git a/releng/scripts/change_to_eplv2.sh b/releng/scripts/change_to_eplv2.sh
new file mode 100755
index 00000000000..d2971606953
--- /dev/null
+++ b/releng/scripts/change_to_eplv2.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+
+find . -type f ! -name "change_to_eplv2.sh" ! -path "./.git/*" ! \( -name debug.product -name "*.exsd" -or -name cdt_c_over_cdt.htm \) \
+ -exec sed -i -E \
+ -e 's@Eclipse Public License v1.0@Eclipse Public License 2.0@g' \
+ -e 's@^([[:blank:]]*[^[:blank:]])([[:blank:]]*)(All rights reserved. )@\1\n\1\2@' \
+ -e 's@\.[[:blank:]]*All rights reserved.@\.@' \
+ -e 's@All rights reserved.([[:blank:]]*)@@' \
+ -e 's@\<a href=\"http://www.eclipse.org/legal/epl-v10.html\"\>@\<a href=\"http://www.eclipse.org/legal/epl-2.0/\"\>@' \
+ -e 's@at http://www.eclipse.org/legal/epl-v10.html@at https://www.eclipse.org/legal/epl-2.0/@' \
+ -e 's@([[:blank:]]*[^[:blank:]]{1,2})([[:blank:]]*)http://www.eclipse.org/legal/epl-v10.html@\1\2https://www.eclipse.org/legal/epl-2.0/\n\1\n\1\2SPDX-License-Identifier: EPL-2.0@' \
+ {} +
+
+find . -type f ! -name "change_to_eplv2.sh" ! -path "./.git/*" \( -name debug.product -name "*.exsd" -or -name cdt_c_over_cdt.htm -or -name "*.properties" \) \
+ -exec sed -i -E \
+ -e 's@Eclipse Public License v1.0@Eclipse Public License 2.0@g' \
+ -e 's@^([[:blank:]]*[^[:blank:]])([[:blank:]]*)(All rights reserved. )@\1\n\1\2@' \
+ -e 's@\.[[:blank:]]*All rights reserved.@\.@' \
+ -e 's@All rights reserved.([[:blank:]]*)@@' \
+ -e 's@http://www.eclipse.org/legal/epl-v10.html@https://www.eclipse.org/legal/epl-2.0/@' \
+ {} +
+
+find . -type f ! -name "change_to_eplv2.sh" ! -name debug.product ! -path "./.git/*" ! -name "*.properties" \
+ -exec sed -i -E \
+ -e 's@([[:blank:]]*)http://www.eclipse.org/legal/epl-v10.html@\1https://www.eclipse.org/legal/epl-2.0/\n\1\n\1SPDX-License-Identifier: EPL-2.0@' \
+ {} +
+
+find . -type f ! -name "change_to_eplv2.sh" ! -path "./.git/*" -name "build.properties" \
+ -exec sed -i -E \
+ -e 's@epl-v10.html@epl-v20.html@' \
+ {} +
+
+mkdir -p /tmp/eplv2
+curl -s https://www.eclipse.org/legal/epl/epl-2.0/about.html > /tmp/eplv2/about.html
+curl -s http://www.eclipse.org/legal/epl/notice.html > /tmp/eplv2/notice.html
+curl -s http://www.eclipse.org/legal/epl/notice.html > /tmp/eplv2/license.html
+curl -s http://www.eclipse.org/legal/epl/feature.properties.txt > /tmp/eplv2/feature.properties.txt
+
+find . -name about.html -exec cp /tmp/eplv2/about.html {} \;
+find . -name license.html -exec cp /tmp/eplv2/license.html {} \;
+find . -name notice.html -exec cp /tmp/eplv2/notice.html {} \;
+for i in `find . -name epl-v10.html`; do
+ rm $i
+ cp /tmp/eplv2/license.html `dirname $i`/epl-v20.html
+done

Back to the top