summaryrefslogtreecommitdiffstats
path: root/lib/control.sh
Commit message (Collapse)AuthorAgeFilesLines
* ob_parse_control(): Fix variable name in expansionPatrick McDermott2019-03-161-1/+1
| | | | Bug found with "set -u" in test suite.
* Add braces to param exps in arith substsPatrick McDermott2019-03-161-2/+2
|
* Fix missing "()" after function names in @detailsPatrick McDermott2019-03-141-4/+4
| | | | | Also fix function name in ob_get_system_plat()'s @details and update ob_error()'s @details.
* Protect against cmd operands beginning with "-"Patrick McDermott2019-03-131-1/+1
|
* ob_parse_changelog(), ob_parse_control(): Explicitly assign null stringsPatrick McDermott2019-03-131-1/+1
| | | | | POSIX say, "If value is not specified, the variable shall be given a null value." Make this explicit, for consistency.
* ob_substvars(): s/while true/while :/Patrick McDermott2019-03-131-1/+1
|
* ob_substvars(), ob_init_package(): Call _ob_error_msg()Patrick McDermott2019-03-131-1/+1
|
* libopkbuild: Abort on invalid function argumentsPatrick McDermott2019-03-131-46/+21
| | | | | | | | | | Shift arguments and abort instead of returning 125. Incorrect numbers of function arguments suggest application/library incompatibilities or serious errors by the application developer. Either way, the application developer should be made immediately aware of this (and not allowed to simply not check return values), and continuing to run and handle any further API calls may be unsafe.
* lib/control.sh, lib/package.sh: Replace echo with here-document in tr commandsPatrick McDermott2019-03-121-2/+8
|
* ob_parse_control(): Rewrite missing fields handlingPatrick McDermott2019-03-121-6/+7
| | | | Get rid of echo and sed.
* ob_parse_control(): Rewrite field checkingPatrick McDermott2019-03-121-23/+26
| | | | | | | Get rid of the echo and sed pipeline and use case constructs instead of "[" commands with "${parameter%word}" expansions. The new logic also will only report duplicate unknown fields once.
* ob_substvars(): Replace echo in eval commandPatrick McDermott2019-03-121-1/+1
|
* ob_set_substvar(): Don't allow "_" in variable namesPatrick McDermott2019-03-121-2/+2
| | | | | The character was allowed due to the details of the implementation, but the SPF 2.0 specification doesn't allow it.
* ob_substvars(): Validate variable namesPatrick McDermott2019-03-121-0/+11
|
* ob_set_substvar(): Make validation more immediately clearPatrick McDermott2019-03-121-4/+2
| | | | | | The original version in 000a27ff used a "${parameter:-word}" default value expansion to detect an empty string. Instead, let the case construct match empty strings directly.
* ob_set_substvar(): Replace sed with readPatrick McDermott2019-03-121-10/+3
|
* _ob_parse_control_error(): Use _ob_warn_msg()Patrick McDermott2019-03-121-12/+3
|
* Use (or plan to use) _ob_warn_msg()Patrick McDermott2019-03-111-2/+4
|
* Revert "ob_parse_control(): Run parse error callback"Patrick McDermott2019-03-111-6/+35
| | | | This reverts commit d80290a2f8c9f069261da78afd2f275e84923d0f.
* ob_parse_control(): Run parse error callbackPatrick McDermott2019-01-051-35/+6
|
* Revert "[WIP] ob_parse_control(): Run an error callback"Patrick McDermott2019-01-051-19/+41
| | | | This reverts commit d1f79411c618a7a3d078430450631dfca85c2a07.
* [WIP] ob_parse_control(): Run an error callbackPatrick McDermott2019-01-051-41/+19
|
* _OB_LF: Define and use newline constantPatrick McDermott2019-01-051-2/+1
|
* ob_parse_control(): Replace [ commands after callbacksPatrick McDermott2019-01-051-4/+2
|
* ob_parse_control(): Update/improve field_cb documentationPatrick McDermott2019-01-051-8/+11
|
* ob_parse_control(): Add a user_data operandPatrick McDermott2019-01-051-6/+10
|
* ob_parse_control(): Pass field name and value as argsPatrick McDermott2019-01-051-17/+8
|
* ob_parse_control(): Replace param prefix/suffix removals with readPatrick McDermott2019-01-051-5/+4
|
* ob_parse_control(): Replace if construct with casePatrick McDermott2019-01-051-54/+55
|
* lib/changelog.sh, lib/control.sh, lib/locale.sh: Update copyright yearsPatrick McDermott2018-12-291-1/+1
|
* ob_substvars(): Add a TODO commentPatrick McDermott2018-12-291-0/+1
|
* ob_substvars(): DocumentPatrick McDermott2018-12-291-0/+9
|
* ob_set_substvar(): Improve eval commandPatrick McDermott2018-12-291-4/+1
|
* ob_set_substvar(): Document that 125 is returned if name is emptyPatrick McDermott2018-12-291-1/+1
|
* ob_set_substvar(): Add a TODO commentPatrick McDermott2018-12-281-0/+1
|
* ob_set_substvar(): Fix successful return valuePatrick McDermott2018-12-281-2/+3
|
* ob_set_substvar(): DocumentPatrick McDermott2018-12-281-0/+9
|
* ob_parse_control(): DocumentPatrick McDermott2018-12-281-0/+23
|
* ob_set_substvar(): Shorten sed script commentsPatrick McDermott2018-12-251-6/+6
|
* libopkbuild: Move function definitions before points of usePatrick McDermott2018-12-251-29/+29
|
* libopkbuild: Update header comments, copyright years, & licensePatrick McDermott2018-12-241-9/+9
|
* libopkbuild: Drop include guardsPatrick McDermott2018-12-221-3/+0
|
* ob_use(): RemovePatrick McDermott2018-12-221-3/+0
|
* _ob_parse_control_error(): Drop quotes around int.P. J. McDermott2013-08-181-1/+1
|
* lib/*.sh, lib/*/*.sh: Add ".sh" to header comment.P. J. McDermott2013-08-181-1/+1
|
* lib/*.sh, lib/*/*.sh: Rewrite include guards.P. J. McDermott2013-08-181-2/+2
| | | | This is one step toward adding `set -u` to opkbuild.
* lib/control.sh: Reflow long command lines.P. J. McDermott2013-08-181-6/+3
|
* lib/control.sh: Remove _ob_local.P. J. McDermott2013-08-181-119/+125
|
* Use cat in ob_parse_{control,changelog}().P. J. McDermott2012-11-221-1/+3
| | | | This allows lines to be read from standard input.
* ob_set_substvar(): Escape single quotes in value.P. J. McDermott2012-11-161-0/+3
|