File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 134
134
echo -e " Using Bob version \x1B[35m${bob_version} \x1B[0m SHA: \x1B[35m${bob_sha} \x1B[0m"
135
135
136
136
bob_path=" ${bob_folder} bob${bob_version} .jar"
137
- if [ ! -f ${bob_path} ]; then
138
- BOB_URL=" https://d.defold.com/archive/${bob_channel} /${bob_sha} /bob/bob.jar"
139
- echo " Unable to find bob${bob_version} .jar. Downloading it from d.defold.com: ${BOB_URL} }"
140
- echo " curl -L -o ${bob_path} ${BOB_URL} "
141
- curl -L -o ${bob_path} ${BOB_URL}
137
+ download_bob () {
138
+ if [ ! -f ${bob_path} ]; then
139
+ BOB_URL=" https://d.defold.com/archive/${bob_channel} /${bob_sha} /bob/bob.jar"
140
+ echo " Unable to find bob${bob_version} .jar. Downloading it from d.defold.com: ${BOB_URL} }"
141
+ echo " curl -L -o ${bob_path} ${BOB_URL} "
142
+ curl -L -o ${bob_path} ${BOB_URL}
143
+ fi
144
+ }
145
+ download_bob
146
+
147
+ real_bob_sha=$( java -jar ${bob_path} --version | cut -d " :" -f3 | cut -d " " -f2)
148
+ if [ ! ${real_bob_sha} == ${bob_sha} ]; then
149
+ echo " Bob SHA mismatch (file bob SHA and settings bob SHA). Redownloading..."
150
+ rm ${bob_path}
151
+ download_bob
142
152
fi
143
153
144
154
You can’t perform that action at this time.
0 commit comments