mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-03 20:19:19 +01:00
Add some comments
This commit is contained in:
parent
79c87b2c72
commit
04537b8f2d
@ -2908,6 +2908,11 @@ sub get_params() {
|
||||
#
|
||||
# getparams was interpreted by bash
|
||||
#
|
||||
# - Variable names are preceded by 'declare -x '
|
||||
# - Param values are delimited by double quotes
|
||||
# - Embedded double quotes are escaped with '\\'
|
||||
# - Valueless variables are supported (e.g., 'declare -x foo')
|
||||
#
|
||||
for ( @params ) {
|
||||
if ( /^declare -x (.*?)="(.*[^\\])"$/ ) {
|
||||
$params{$1} = $2 unless $1 eq '_';
|
||||
@ -2925,6 +2930,10 @@ sub get_params() {
|
||||
#
|
||||
# getparams was interpreted by dash/ash/busybox
|
||||
#
|
||||
# - Variable name preceded by 'export '
|
||||
# - Param values are delimited by single quotes.
|
||||
# - Embedded single quotes are transformed to the five characters '"'"'
|
||||
#
|
||||
for ( @params ) {
|
||||
if ( /^export (.*?)='(.*'"'"')$/ ) {
|
||||
$params{$variable=$1}="${2}\n";
|
||||
|
Loading…
Reference in New Issue
Block a user