Check-in [d41d1c1345]
Overview
Comment:Better API client
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d41d1c13459a4e2568540fd4e1e0c24922265920
User & Date: rkeene on 2019-05-01 13:47:04
Other Links: manifest | tags
Context
2019-05-01
13:51
Updated ignores to include NSF check-in: c8139e1826 user: rkeene tags: trunk
13:47
Better API client check-in: d41d1c1345 user: rkeene tags: trunk
2019-04-10
16:20
KitCreator 0.11.1 check-in: 86cf5d1b91 user: rkeene tags: trunk, 0.11.1
Changes

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

     4      4   endpoint_url="https://kitcreator.rkeene.org/kitcreator"
     5      5   
     6      6   # Help
     7      7   function print_help() {
     8      8   	echo 'download-api-client [--platform <platform>] [--tcl-version <version>]'
     9      9   	echo '                    [--kitcreator-version <version>] [--kitdll]'
    10     10   	echo '                    [--threaded] [--debug] [--dynamictk]'
    11         -	echo '                    [--staticpkgs] [--verbose]'
           11  +	echo '                    [--staticpkgs] [--verbose] [--pkg-<package>...]'
           12  +	echo '                    [--opt-<option>...] [--empty-packages]'
    12     13   	echo 'download-api-client {--help|--platforms|--tcl-versions|'
    13         -	echo '                     --kitcreator-versions|--packages}'
           14  +	echo '                     --kitcreator-versions|--packages|'
           15  +	echo '                     --options}'
    14     16   }
    15     17   
    16     18   # Set arguments
    17     19   declare -A jsonArgs
    18     20   jsonArgs["platform"]="$(uname -s)-$(uname -m)"
    19     21   
    20     22   nextArg=''
    21     23   kit_filename=''
    22     24   options=()
    23     25   packages=()
    24     26   internalOptionsVerbose='false'
           27  +noPackages='false'
    25     28   for arg in "$@"; do
    26     29   	if [ -n "${nextArg}" ]; then
    27     30   		jsonArgs["${nextArg}"]="${arg}"
    28     31   		nextArg=''
    29     32   		continue
    30     33   	fi
    31     34   
................................................................................
    36     39   		--platform|--tcl-version|--kitcreator-version)
    37     40   			nextArg="${arg:2}"
    38     41   			nextArg="${nextArg//-/_}"
    39     42   			;;
    40     43   		--kitdll|--threaded|--debug|--dynamictk|--staticpkgs)
    41     44   			options+=("${arg:2}")
    42     45   			;;
    43         -		--mk4tcl|--tcc4tcl|--tclcurl|--tk|--tls|--tuapi|--itcl|--duktape|--lmdb|--udp)
    44         -			packages+=("${arg:2}")
           46  +		--opt-*)
           47  +			options+=("${arg:6}")
           48  +			;;
           49  +		--pkg-*)
           50  +			packages+=("${arg:6}")
           51  +			noPackages='false'
           52  +			;;
           53  +		--empty-packages)
           54  +			packages=()
           55  +			noPackages='true'
    45     56   			;;
    46     57   		--platforms|--tcl-versions|--kitcreator-versions|--packages|--options)
    47     58   			action="${arg:2}"
    48     59   			action="${action//-/_}"
    49     60   
    50     61   			formatString='%-20s | %s\n'
    51     62   			printf "${formatString}" Name Description
................................................................................
    66     77   	esac
    67     78   done
    68     79   
    69     80   if [ -n "${options[*]}" ]; then
    70     81   	jsonArgs["options"]="${options[*]}"
    71     82   fi
    72     83   
    73         -if [ -n "${packages[*]}" ]; then
           84  +if [ -n "${packages[*]}" -o "${noPackages}" = 'true' ]; then
    74     85   	jsonArgs["packages"]="${packages[*]}"
    75     86   fi
    76     87   
    77     88   # Convert arguments into a request
    78     89   jqArgs=()
    79     90   jqSettings=''
    80     91   for jsonArg in "${!jsonArgs[@]}"; do