Check-in [07782d2b79]
Overview
Comment:Add more options to the web client
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 07782d2b793c2a6e53f5716acf18389e338f86e4
User & Date: rkeene on 2019-04-10 16:19:17
Other Links: manifest | tags
Context
2019-04-10
16:20
KitCreator 0.11.1 check-in: 86cf5d1b91 user: rkeene tags: trunk, 0.11.1
16:19
Add more options to the web client check-in: 07782d2b79 user: rkeene tags: trunk
16:17
Upgraded to latest LibreSSL check-in: 319d724e41 user: rkeene tags: trunk
Changes

Modified build/utils/download-api-client from [45c8f50b64] to [67b5085a35].

16
17
18
19
20
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
16
17
18
19
20
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







+


















+
+
+







# Set arguments
declare -A jsonArgs
jsonArgs["platform"]="$(uname -s)-$(uname -m)"

nextArg=''
kit_filename=''
options=()
packages=()
internalOptionsVerbose='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}")
			;;
		--mk4tcl|--tcc4tcl|--tclcurl|--tk|--tls|--tuapi|--itcl|--duktape|--lmdb|--udp)
			packages+=("${arg:2}")
			;;
		--platforms|--tcl-versions|--kitcreator-versions|--packages|--options)
			action="${arg:2}"
			action="${action//-/_}"

			formatString='%-20s | %s\n'
			printf "${formatString}" Name Description
59
60
61
62
63
64
65
66





67
68
69
70
71
72
73
74

75
76
77
78
79
80
81
63
64
65
66
67
68
69

70
71
72
73
74
75
76
77
78
79
80
81

82
83
84
85
86
87
88
89







-
+
+
+
+
+







-
+







			echo "Invalid option \"${arg}\"" >&2
			print_help >&2
			exit 1
	esac
done

if [ -n "${options[*]}" ]; then
	jsonArgs["options"]="${options[@]}"
	jsonArgs["options"]="${options[*]}"
fi

if [ -n "${packages[*]}" ]; then
	jsonArgs["packages"]="${packages[*]}"
fi

# Convert arguments into a request
jqArgs=()
jqSettings=''
for jsonArg in "${!jsonArgs[@]}"; do
	case "${jsonArg}" in
		options)
		options|packages)
			requestArray='[]'
			for value in ${jsonArgs[${jsonArg}]}; do
				requestArray="$(jq -crM --arg value "${value}" '. + [ $value ]' <<<"${requestArray}")"
			done
			jqArgs+=(--argjson "${jsonArg}" "${requestArray}")
			;;
		*)