summaryrefslogtreecommitdiff
path: root/vsvs-parser
diff options
context:
space:
mode:
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