aboutsummaryrefslogtreecommitdiffstats
path: root/main/augeas/0010-Shellvars-allow-the-builtin.patch
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-12-08 16:37:28 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2014-12-08 16:37:33 +0200
commit491d4e86baf9fcf4c526f827a70fc8d70b4fd899 (patch)
tree5b99e070bc1c370d59128f943ee8d58ec4b565c1 /main/augeas/0010-Shellvars-allow-the-builtin.patch
parent760934f05b012d865c323a7e4aaf593e3302b008 (diff)
downloadaports-491d4e86baf9fcf4c526f827a70fc8d70b4fd899.tar.bz2
aports-491d4e86baf9fcf4c526f827a70fc8d70b4fd899.tar.xz
main/augeas: more fixes to Shellvars lense
parse e.g. main/ruby/APKBUILD
Diffstat (limited to 'main/augeas/0010-Shellvars-allow-the-builtin.patch')
-rw-r--r--main/augeas/0010-Shellvars-allow-the-builtin.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/main/augeas/0010-Shellvars-allow-the-builtin.patch b/main/augeas/0010-Shellvars-allow-the-builtin.patch
new file mode 100644
index 0000000000..f6a0e7050a
--- /dev/null
+++ b/main/augeas/0010-Shellvars-allow-the-builtin.patch
@@ -0,0 +1,41 @@
+From 5f8f638b4da32a9b7ccd797b32e956a4887b5e79 Mon Sep 17 00:00:00 2001
+From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+Date: Mon, 8 Dec 2014 15:10:28 +0200
+Subject: [PATCH 10/10] Shellvars: allow the [ builtin
+
+---
+ lenses/shellvars.aug | 2 +-
+ lenses/tests/test_shellvars.aug | 4 ++++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug
+index 9cef3fd..07c7a52 100644
+--- a/lenses/shellvars.aug
++++ b/lenses/shellvars.aug
+@@ -78,7 +78,7 @@ module Shellvars =
+ . del /\.|source/ "." . label ".source"
+ . Util.del_ws_spc . store /[^;=# \t\n]+/
+
+- let shell_builtin_cmds = "ulimit" | "shift" | "exit"
++ let shell_builtin_cmds = "ulimit" | "shift" | "exit" | "["
+
+ let builtin =
+ Util.indent . label "@builtin"
+diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug
+index f38fd30..68a77ad 100644
+--- a/lenses/tests/test_shellvars.aug
++++ b/lenses/tests/test_shellvars.aug
+@@ -165,6 +165,10 @@ unset ONBOOT # We do not want this var
+ { "@builtin" = "exit" }
+ { "@builtin" = "exit" { "args" = "2" } }
+
++ (* Allow the [ builtin *)
++ test Shellvars.lns get "[ -f $FILENAME ]\n" =
++ { "@builtin" = "[" { "args" = "-f $FILENAME ]" } }
++
+ (* Allow wrapping builtin arguments to multiple lines *)
+ test Shellvars.lns get "ulimit -c \\\nunlimited\nulimit \\\n -x 123\n" =
+ { "@builtin" = "ulimit" { "args" = "-c \\\nunlimited" } }
+--
+1.8.3.1
+