提交 61241a12 编写于 作者: A Aaron Xiao 提交者: Jiaming Tao

Scripts: Check agreement on dev_start instead of inside container.

上级 47363db7
......@@ -13,8 +13,7 @@ cache:
- $HOME/.cache/bazel
install: skip
before_script:
- if [ ! -d "${HOME}/.cache" ]; then mkdir ${HOME}/.cache; fi
- cp scripts/AGREEMENT.txt ${HOME}/.cache/.apollo_agreement.txt
- cp scripts/AGREEMENT.txt ${HOME}/.apollo_agreement.txt
script:
- ./docker/scripts/dev_start.sh
- ./apollo_docker.sh ${JOB}
......
......@@ -24,6 +24,32 @@ VERSION_X86_64="dev-x86_64-20180419_1510"
VERSION_AARCH64="dev-aarch64-20170927_1111"
VERSION_OPT=""
# Check whether user has agreed license agreement
function check_agreement() {
agreement_record="${HOME}/.apollo_agreement.txt"
if [ -e "$agreement_record" ]; then
return
fi
AGREEMENT_FILE="$APOLLO_ROOT_DIR/scripts/AGREEMENT.txt"
if [ ! -e "$AGREEMENT_FILE" ]; then
error "AGREEMENT $AGREEMENT_FILE does not exist."
exit 1
fi
cat $AGREEMENT_FILE
tip="Type 'y' or 'Y' to agree to the license agreement above, or type any other key to exit"
echo $tip
read -n 1 user_agreed
if [ "$user_agreed" == "y" ] || [ "$user_agreed" == "Y" ]; then
cp $AGREEMENT_FILE $agreement_record
echo "$tip" >> $agreement_record
echo "$user_agreed" >> $agreement_record
else
exit 1
fi
}
function show_usage()
{
cat <<EOF
......@@ -48,6 +74,7 @@ if [ -e /proc/sys/kernel ]; then
fi
source ${APOLLO_ROOT_DIR}/scripts/apollo_base.sh
check_agreement
VOLUME_VERSION="latest"
DEFAULT_MAPS=(
......
......@@ -3,11 +3,10 @@ THE APOLLO OPEN PLATFORM (“PLATFORM”) FOR AND ON BEHALF OF ITSELF AND ITS SU
2. LICENSE GRANT: Subject to the terms and conditions of this Agreement, with the exception of different license terms and license grants for separate, individual third-party components as set forth below, the Software is licensed to you under the terms of the Apache 2.0 license available at: https://www.apache.org/licenses/LICENSE-2.0. You agree to these terms with respect to the Software.
3. THIRD PARTY CODE: Additional copyright notices and license terms applicable to portions of the Software are set forth below in Appendix A. You expressly agree to the license terms associated with third party code set forth in Appendix A. In addition to any terms and conditions of any third party license identified in Appendix A, the disclaimer of warranty and limitation of liability provisions in paragraphs 4 and 5 of this License Agreement shall apply to all Software in this distribution. YOU EXPRESSLY AGREE THAT YOU HAVE REVIEWED THE TERMS OF THE AGREEMENTS LINKED TO AND RESTATED IN APPENDIX A TO THIS AGREEMENT, AND THAT YOU AGREE TO THE TERMS OF THOSE AGREEMENTS.
4. DISCLAIMER OF WARRANTY. THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. BAIDU FURTHER DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
5. LIMITATION OF LIABILITY. IN NO EVENT SHALL BAIDU BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE, DATA OR DATA USE, INCURRED BY YOU OR ANY THIRD PARTY, WHETHER IN AN ACTION IN CONTRACT OR TORT, EVEN IF BAIDU HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BAIDU’S ENTIRE LIABILITY FOR DAMAGES HEREUNDER SHALL IN NO EVENT EXCEED ONE ONE CENT (U.S. $0.01).
5. LIMITATION OF LIABILITY. IN NO EVENT SHALL BAIDU BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE, DATA OR DATA USE, INCURRED BY YOU OR ANY THIRD PARTY, WHETHER IN AN ACTION IN CONTRACT OR TORT, EVEN IF BAIDU HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BAIDU’S ENTIRE LIABILITY FOR DAMAGES HEREUNDER SHALL IN NO EVENT EXCEED ONE CENT (U.S. $0.01).
Copyright (c) 2017 Various License Holders. All Rights Reserved
Apollo software is built on top of various other open source software packages, a complete list of licenses are located at https://github.com/ApolloAuto/apollo/blob/master/third_party/ACKNOWLEDGEMENT.txt
You agree to the terms of all the License Agreements.
......@@ -68,34 +68,9 @@ function fail() {
exit -1
}
# Check whether user has agreed license agreement
function check_agreement() {
agreement_record="$HOME/.cache/.apollo_agreement.txt"
if [ ! -e "$agreement_record" ]; then
AGREEMENT_FILE="$APOLLO_ROOT_DIR/scripts/AGREEMENT.txt"
if [ ! -e "$AGREEMENT_FILE" ]; then
error "AGREEMENT $AGREEMENT_FILE does not exist."
exit 0
fi
cat $AGREEMENT_FILE
tip="Type 'y' or 'Y' to agree to the license agreement above, or type any other key to exit"
echo $tip
read -n 1 user_agreed
if [ "$user_agreed" == "y" ] || [ "$user_agreed" == "Y" ]; then
rm -rf $agreement_record
cat $AGREEMENT_FILE >> $agreement_record
echo "$tip" >> $agreement_record
echo "$user_agreed" >> $agreement_record
else
exit 0
fi
fi
}
function check_in_docker() {
if [ -f /.dockerenv ]; then
APOLLO_IN_DOCKER=true
check_agreement
else
APOLLO_IN_DOCKER=false
fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册