support de la syntaxe ?=
This commit is contained in:
@@ -151,9 +151,9 @@ BEGIN {
|
||||
match_indented = 0
|
||||
}
|
||||
|
||||
/^(export[ \t]+)?[a-zA-Z_][a-zA-Z0-9_]*[-+%#]=/ {
|
||||
/^(export[ \t]+)?[a-zA-Z_][a-zA-Z0-9_]*[-+%#?]=/ {
|
||||
# manipulation de variables de type PATH
|
||||
match($0, /^(export[ \t]+)?([a-zA-Z_][a-zA-Z0-9_]*)([-+%#])=(.*)$/, parts)
|
||||
match($0, /^(export[ \t]+)?([a-zA-Z_][a-zA-Z0-9_]*)([-+%#?])=(.*)$/, parts)
|
||||
name = parts[2]
|
||||
type = parts[3]
|
||||
value = parts[4]
|
||||
@@ -163,6 +163,8 @@ BEGIN {
|
||||
print "uinspath " value " " name
|
||||
} else if (type == "-") {
|
||||
print "udelpath " value " " name
|
||||
} else if (type == "?") {
|
||||
print "[ -n \"$" name "\" ] || " name "=" value
|
||||
}
|
||||
print "export " name
|
||||
next
|
||||
|
||||
Reference in New Issue
Block a user