summarylogtreecommitdiffstats
path: root/update-eula
diff options
context:
space:
mode:
authorOscar Morante2016-07-22 12:31:48 +0300
committerOscar Morante2016-07-22 14:39:21 +0300
commit50d149a5e98a9b0c4067b982c93fffa8a7e73dbc (patch)
tree934867049cc3ff4cb82519898a6e1cc46fe26572 /update-eula
parentffae03d3796269baf3bc82172329edce0d39d8ae (diff)
downloadaur-50d149a5e98a9b0c4067b982c93fffa8a7e73dbc.tar.gz
fix and tweaks to update-eula script
Diffstat (limited to 'update-eula')
-rwxr-xr-xupdate-eula13
1 files changed, 10 insertions, 3 deletions
diff --git a/update-eula b/update-eula
index 006204fa82f6..576f4cc0de4d 100755
--- a/update-eula
+++ b/update-eula
@@ -4,15 +4,22 @@
#
# ln -s -f ../../update-eula .git/hooks/pre-push
#
-URL="https://unity3d.com/legal/eula"
+TOS_URL="https://unity3d.com/legal/terms-of-service"
+TOS_SW_URL="$TOS_URL/software"
# Refer users to the original EULA
-echo -e "*** for an up-to-date EULA refer to ($URL) ***\n\n" > EULA
+cat > EULA <<EOF
+*** This is only the Software section of Unity's Terms of Service
+*** for the complete Terms Of Service refer to ($TOS_URL)
+
+EOF
# Download updated EULA, convert to plain text
-curl -s $URL \
+curl -s $TOS_SW_URL \
| xmllint --html --xpath "//section[@id='content']" - 2> /dev/null \
| elinks -dump \
+ | sed '/Quick jump/,$d' \
+ | sed -r ':loop; s/([^ ]) +([^ ])/\1 \2/g; t loop' \
| sed '/Quick jump/,$d' >> EULA
# Check for changes (pre-push hook)