summaryrefslogtreecommitdiff
path: root/vsvs-parser
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-12-06 16:57:48 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-12-06 16:57:48 +0300
commitf5596618ff3e6819c547bf833388d25b9bb36293 (patch)
tree7a47b6a3ba030e525d20713de428c14d06b6b9e4 /vsvs-parser
parentf229b632cbc31c5efad109589cd36b07bcd48817 (diff)
downloadvsvs-f5596618ff3e6819c547bf833388d25b9bb36293.tar
vsvs-f5596618ff3e6819c547bf833388d25b9bb36293.tar.xz
vsvs-f5596618ff3e6819c547bf833388d25b9bb36293.zip
.
Diffstat (limited to 'vsvs-parser')
-rw-r--r--vsvs-parser15
1 files changed, 15 insertions, 0 deletions
diff --git a/vsvs-parser b/vsvs-parser
new file mode 100644
index 0000000..ba9c098
--- /dev/null
+++ b/vsvs-parser
@@ -0,0 +1,15 @@
+#!/bin/bash
+after () { test -z "${2##*$1*}" && echo -n "${2#*$1}" }
+key=""
+value=""
+while IFS="" read line
+do
+ if test -z "${line%% *}"
+ then value="${value}"$'\n'"$(after " " "$line")"
+ else
+ eval $1
+ key="${line%% *}"
+ value="$(after " " "$line")"
+ fi
+done
+eval $1