-
Notifications
You must be signed in to change notification settings - Fork 0
/
agree
executable file
·35 lines (31 loc) · 1.3 KB
/
agree
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# agree
# Prompt for user agreement that they agree with terms in "USAGE_AGREEMENT.md"
# Output USER_AGREEMENT.md
echo >> USAGE_AGREEMENT.md
echo press "q" to exit document. >> USAGE_AGREEMENT.md
echo >> USAGE_AGREEMENT.md | less USAGE_AGREEMENT.md
sed -i ':a;N;$!ba;s/\n\npress q to exit document.\n//' USAGE_AGREEMENT.md
# Prompt for agreement.
echo
echo \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
echo Do you agree to the terms specified in USAGE_AGREEMENT.md
echo
echo YES or NO
echo
echo \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
read _doesUserAgree
if [ "$_doesUserAgree" = "YES" ]; then
sed -i "s/_acknowledgeAndAgreeToUSAGE_AGREEMENT=0/_acknowledgeAndAgreeToUSAGE_AGREEMENT=1/" config-variables.sh
if [ -e reset ]; then
sed -i "s/_acknowledgeAndAgreeToUSAGE_AGREEMENT=0/_acknowledgeAndAgreeToUSAGE_AGREEMENT=1/" reset/config-variables.sh
fi
echo && echo You have agreed and can now use the tool. && echo
echo Press enter to exit, then re-run the make command. && echo
read _waitOne
exit
else
echo You have not agreed. You must agree before using the tool. Press enter exit.
read _waitOne
exit
fi