|
@@ -60,9 +60,9 @@ else
|
60
|
60
|
exit 1;
|
61
|
61
|
fi;
|
62
|
62
|
|
63
|
|
-showLicense() {
|
64
|
|
- # Get License Text
|
65
|
|
- FILE=`mktemp license.XXXXXXXXXXXXXX`
|
|
63
|
+showLicence() {
|
|
64
|
+ # Get Licence Text
|
|
65
|
+ FILE=`mktemp licence.XXXXXXXXXXXXXX`
|
66
|
66
|
if [ "${ISFREEBSD}" != "" ]; then
|
67
|
67
|
WGET=`which wget`
|
68
|
68
|
FETCH=`which fetch`
|
|
@@ -80,11 +80,11 @@ showLicense() {
|
80
|
80
|
${CURL} -s -o ${FILE} ${URL}
|
81
|
81
|
fi;
|
82
|
82
|
else
|
83
|
|
- # Location of license start
|
|
83
|
+ # Location of licence start
|
84
|
84
|
STARTLINE=`grep ${GREPOPTS} "^more <<\"EOF\"$" jre.bin`
|
85
|
85
|
STARTLINE=$((${STARTLINE%%:*} + 1))
|
86
|
|
- # Location of license end
|
87
|
|
- ENDLINE=`grep ${GREPOPTS} "Do you agree to the above license terms?" jre.bin`
|
|
86
|
+ # Location of licence end
|
|
87
|
+ ENDLINE=`grep ${GREPOPTS} "Do you agree to the above licence terms?" jre.bin`
|
88
|
88
|
ENDLINE=$((${ENDLINE%%:*} - 4))
|
89
|
89
|
|
90
|
90
|
head -n ${ENDLINE} jre.bin | tail ${TAILOPTS}${STARTLINE} > ${FILE}
|
|
@@ -93,7 +93,7 @@ showLicense() {
|
93
|
93
|
# Send text to console.
|
94
|
94
|
echo ""
|
95
|
95
|
echo "-----------------------------------------------------------------------"
|
96
|
|
- echo "Java License"
|
|
96
|
+ echo "Java Licence"
|
97
|
97
|
echo "-----------------------------------------------------------------------"
|
98
|
98
|
cat ${FILE}
|
99
|
99
|
echo "-----------------------------------------------------------------------"
|
|
@@ -101,10 +101,10 @@ showLicense() {
|
101
|
101
|
# Now try to use the GUI Dialogs.
|
102
|
102
|
if [ "" != "${ISKDE}" -a "" != "${KDIALOG}" -a "" != "${DISPLAY}" ]; then
|
103
|
103
|
echo "Dialog on Display: ${DISPLAY}"
|
104
|
|
- ${KDIALOG} --title "DMDirc: Java License" --textbox ${FILE} 600 400
|
|
104
|
+ ${KDIALOG} --title "DMDirc: Java Licence" --textbox ${FILE} 600 400
|
105
|
105
|
elif [ "" != "${ISGNOME}" -a "" != "${ZENITY}" -a "" != "${DISPLAY}" ]; then
|
106
|
106
|
echo "Dialog on Display: ${DISPLAY}"
|
107
|
|
- ${ZENITY} --text-info --title "DMDirc: Java License" --filename=${FILE} --width=600 --height=400
|
|
107
|
+ ${ZENITY} --text-info --title "DMDirc: Java Licence" --filename=${FILE} --width=600 --height=400
|
108
|
108
|
fi
|
109
|
109
|
|
110
|
110
|
# Remove temp file
|
|
@@ -120,9 +120,9 @@ if [ "" != "${1}" ]; then
|
120
|
120
|
fi;
|
121
|
121
|
fi;
|
122
|
122
|
|
123
|
|
-messagedialog "Java Install" "Before java can be installed, please review the following license."
|
124
|
|
-showLicense
|
125
|
|
-questiondialog "Java Install" "Do you agree to the Java License?"
|
|
123
|
+messagedialog "Java Install" "Before java can be installed, please review the following licence."
|
|
124
|
+showLicence
|
|
125
|
+questiondialog "Java Install" "Do you agree to the Java Licence?"
|
126
|
126
|
if [ $? -eq 0 ]; then
|
127
|
127
|
if [ "${ISFREEBSD}" != "" ]; then
|
128
|
128
|
JREJAVAHOME="diablo-jre1.6.0_07"
|
|
@@ -153,14 +153,14 @@ if [ $? -eq 0 ]; then
|
153
|
153
|
tar -jxvf jre.tar.bz2
|
154
|
154
|
mv jre.tar.bz2 jre.bin
|
155
|
155
|
else
|
156
|
|
- # Hack jre.bin to allow us to install without asking for a license, or failing
|
|
156
|
+ # Hack jre.bin to allow us to install without asking for a licence, or failing
|
157
|
157
|
# the checksum.
|
158
|
158
|
|
159
|
|
- # Location of license start
|
|
159
|
+ # Location of licence start
|
160
|
160
|
STARTLINE=`grep ${GREPOPTS} "^more <<\"EOF\"$" jre.bin`
|
161
|
161
|
STARTLINE=${STARTLINE%%:*}
|
162
|
|
- # Location of license end
|
163
|
|
- ENDLINE=`grep ${GREPOPTS} "Do you agree to the above license terms?" jre.bin`
|
|
162
|
+ # Location of licence end
|
|
163
|
+ ENDLINE=`grep ${GREPOPTS} "Do you agree to the above licence terms?" jre.bin`
|
164
|
164
|
ENDLINE=$((${ENDLINE%%:*} - 2))
|
165
|
165
|
# Location of checksum start
|
166
|
166
|
CSSTARTLINE=`grep ${GREPOPTS} "^if \[ -x /usr/bin/sum \]; then$" jre.bin`
|
|
@@ -171,7 +171,7 @@ if [ $? -eq 0 ]; then
|
171
|
171
|
# Location of script end
|
172
|
172
|
SCENDLINE=`grep ${GREPOPTS} "^echo \"Done.\"$" jre.bin`
|
173
|
173
|
SCENDLINE=$((${SCENDLINE%%:*} + 2 - (${ENDLINE} - ${STARTLINE}) - (${CSENDLINE} - ${CSSTARTLINE})))
|
174
|
|
- # Remove the license and checksum stuff!
|
|
174
|
+ # Remove the licence and checksum stuff!
|
175
|
175
|
head -n $((${STARTLINE} -1)) jre.bin > jre.bin.tmp
|
176
|
176
|
tail ${TAILOPTS}$((${ENDLINE})) jre.bin | head -n $((${CSSTARTLINE} -1 - ${ENDLINE})) >> jre.bin.tmp
|
177
|
177
|
echo "tail \${tail_args} +${SCENDLINE} \"\$0\" > \$outname" >> jre.bin.tmp
|
|
@@ -234,6 +234,6 @@ if [ $? -eq 0 ]; then
|
234
|
234
|
exit 0;
|
235
|
235
|
fi;
|
236
|
236
|
else
|
237
|
|
- errordialog "Java Install" "You must agree to the license before java can be installed"
|
|
237
|
+ errordialog "Java Install" "You must agree to the licence before java can be installed"
|
238
|
238
|
fi;
|
239
|
239
|
exit 1;
|