Diff

Differences From Artifact [e4f8c366e4]:

To Artifact [3a69b30ec1]:


21
22
23
24
25
26
27

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45



46
47
48
49
50
51
52

nextArg=''
kit_filename=''
options=()
packages=()
internalOptionsVerbose='false'
noPackages='false'

for arg in "$@"; do
	if [ -n "${nextArg}" ]; then
		jsonArgs["${nextArg}"]="${arg}"
		nextArg=''
		continue
	fi

	case "${arg}" in
		--verbose)
			internalOptionsVerbose='true'
			;;
		--platform|--tcl-version|--kitcreator-version)
			nextArg="${arg:2}"
			nextArg="${nextArg//-/_}"
			;;
		--kitdll|--threaded|--debug|--dynamictk|--staticpkgs)
			options+=("${arg:2}")
			;;



		--opt-*)
			options+=("${arg:6}")
			;;
		--pkg-*)
			packages+=("${arg:6}")
			noPackages='false'
			;;







>


















>
>
>







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

nextArg=''
kit_filename=''
options=()
packages=()
internalOptionsVerbose='false'
noPackages='false'
downloadSDK='false'
for arg in "$@"; do
	if [ -n "${nextArg}" ]; then
		jsonArgs["${nextArg}"]="${arg}"
		nextArg=''
		continue
	fi

	case "${arg}" in
		--verbose)
			internalOptionsVerbose='true'
			;;
		--platform|--tcl-version|--kitcreator-version)
			nextArg="${arg:2}"
			nextArg="${nextArg//-/_}"
			;;
		--kitdll|--threaded|--debug|--dynamictk|--staticpkgs)
			options+=("${arg:2}")
			;;
		--sdk)
			downloadSDK='true'
			;;
		--opt-*)
			options+=("${arg:6}")
			;;
		--pkg-*)
			packages+=("${arg:6}")
			noPackages='false'
			;;
140
141
142
143
144
145
146

147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166





167



168
169
	if [ "${internalOptionsVerbose}" = 'true' ]; then
		curl -sSL "${build_log_url}" >&2
	fi

	exit 1
fi


kit_url="$(jq -crM .kit_url <<<"${info}")"
if [ -z "${kit_filename}" ]; then
	kit_filename="${kit_url//*\//}"
	case "${kit_filename}" in
		*.*)
			kit_filename_base="${kit_filename//.*/}"
			kit_filename_ext=".${kit_filename//*./}"
			;;
		*)
			kit_filename_base="${kit_filename}"
			kit_filename_ext=''
			;;
	esac
	kit_filename_platform="$(jq -crM .platform <<<"${info}")"
	kit_filename_tcl_version="$(jq -crM .tcl_version <<<"${info}")"
	kit_filename="${kit_filename_base}-${kit_filename_platform}-${kit_filename_tcl_version}${kit_filename_ext}"
fi

curl -sSL "${kit_url}" > "${kit_filename}"
chmod 755 "${kit_filename}"









echo "Wrote: ${kit_filename}"
exit 0







>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|
>
>
>
>
>

>
>
>


144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
	if [ "${internalOptionsVerbose}" = 'true' ]; then
		curl -sSL "${build_log_url}" >&2
	fi

	exit 1
fi

if [ "${downloadSDK}" = 'false' ]; then
	kit_url="$(jq -crM .kit_url <<<"${info}")"
	if [ -z "${kit_filename}" ]; then
		kit_filename="${kit_url//*\//}"
		case "${kit_filename}" in
			*.*)
				kit_filename_base="${kit_filename//.*/}"
				kit_filename_ext=".${kit_filename//*./}"
				;;
			*)
				kit_filename_base="${kit_filename}"
				kit_filename_ext=''
				;;
		esac
		kit_filename_platform="$(jq -crM .platform <<<"${info}")"
		kit_filename_tcl_version="$(jq -crM .tcl_version <<<"${info}")"
		kit_filename="${kit_filename_base}-${kit_filename_platform}-${kit_filename_tcl_version}${kit_filename_ext}"
	fi

	curl -sSL "${kit_url}" > "${kit_filename}"
	chmod 755 "${kit_filename}"
else
	kit_sdk_url="$(jq -crM .kit_sdk_url <<<"${info}")"
	if [ -z "${kit_filename}" ]; then
		kit_filename="${kit_sdk_url//*\//}"
	fi

	curl -sSL "${kit_sdk_url}" > "${kit_filename}"
fi

echo "Wrote: ${kit_filename}"
exit 0