aboutsummaryrefslogtreecommitdiffstats
path: root/main/augeas/0011-Shellvars-allow-command-specific-environment-variabl.patch
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-12-26 13:45:15 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-12-26 13:45:53 +0200
commitb4c9e501a19a6c1bb02a0c48e0b8bb0830400146 (patch)
tree6fe4d1476d2b4598b773db0c4967c5cc22924eb2 /main/augeas/0011-Shellvars-allow-command-specific-environment-variabl.patch
parentade8a86e66ba5cf2f630a80857eb3b2ad9aca47a (diff)
downloadaports-b4c9e501a19a6c1bb02a0c48e0b8bb0830400146.tar.bz2
aports-b4c9e501a19a6c1bb02a0c48e0b8bb0830400146.tar.xz
main/augeas: Shellvars: allow command-specific environment
Diffstat (limited to 'main/augeas/0011-Shellvars-allow-command-specific-environment-variabl.patch')
-rw-r--r--main/augeas/0011-Shellvars-allow-command-specific-environment-variabl.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/main/augeas/0011-Shellvars-allow-command-specific-environment-variabl.patch b/main/augeas/0011-Shellvars-allow-command-specific-environment-variabl.patch
new file mode 100644
index 0000000000..938c847de0
--- /dev/null
+++ b/main/augeas/0011-Shellvars-allow-command-specific-environment-variabl.patch
@@ -0,0 +1,55 @@
+From e6ca8eadfebbddf87b2ea356db7cbd285ae0f07f Mon Sep 17 00:00:00 2001
+From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+Date: Fri, 26 Dec 2014 13:27:13 +0200
+Subject: [PATCH 11/11] Shellvars: allow command-specific environment variables
+
+---
+ lenses/shellvars.aug | 4 +++-
+ lenses/tests/test_shellvars.aug | 9 ++++++++-
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug
+index 07c7a52..9ee0d05 100644
+--- a/lenses/shellvars.aug
++++ b/lenses/shellvars.aug
+@@ -97,7 +97,9 @@ module Shellvars =
+ let command =
+ let reserved_key = /exit|shift|return|ulimit|unset|export|source|\.|if|for|select|while|until|then|else|fi|done|case/
+ in let word = /[A-Za-z0-9_.-\/]+/
+- in Util.indent . label "@command" . store (word - reserved_key)
++ in Util.indent . label "@command"
++ . [ key key_re . eq . store anyquot . Sep.space . del /(\\\\\n[ \t]*)?/ "" ]*
++ . store (word - reserved_key - /zzz/)
+ . [ Sep.space . label "@arg" . sto_to_semicol]?
+
+ (************************************************************************
+diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug
+index 68a77ad..dd4132e 100644
+--- a/lenses/tests/test_shellvars.aug
++++ b/lenses/tests/test_shellvars.aug
+@@ -552,7 +552,9 @@ esac\n" =
+ test Shellvars.lns get "echo foobar 'and this is baz'
+ /usr/local/bin/myscript.sh with args
+ echo foo \
+-bar\n" =
++bar
++abc=def \
++ ghi=\"jkl mno\" command arg1 arg2\n" =
+ { "@command" = "echo"
+ { "@arg" = "foobar 'and this is baz'" }
+ }
+@@ -563,6 +565,11 @@ bar\n" =
+ { "@arg" = "foo \
+ bar" }
+ }
++ { "@command" = "command"
++ { "abc" = "def" }
++ { "ghi" = "\"jkl mno\"" }
++ { "@arg" = "arg1 arg2" }
++ }
+
+ (* Local Variables: *)
+ (* mode: caml *)
+--
+1.9.3
+