#!/bin/bash # This script is meant to be used by the maintainers to keep the EULA up to # date. It can also be used as a pre-push hook to automate things: # # ln -s -f ../../update-eula .git/hooks/pre-push # TOS_URL="https://unity3d.com/legal/terms-of-service" TOS_SW_URL="$TOS_URL/software" # Refer users to the original EULA cat > EULA < /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) if [ -n "$(git diff EULA)" ]; then echo "EULA has changed." exit 1 fi