summaryrefslogtreecommitdiffstats
path: root/cdbmake-sv.sh
diff options
context:
space:
mode:
Diffstat (limited to 'cdbmake-sv.sh')
-rw-r--r--cdbmake-sv.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/cdbmake-sv.sh b/cdbmake-sv.sh
new file mode 100644
index 0000000..241d46c
--- /dev/null
+++ b/cdbmake-sv.sh
@@ -0,0 +1,22 @@
+awk '
+ {
+ if (split($0,x,"#")) {
+ f = split(x[1],y)
+ if (f >= 2) {
+ if (split(y[2],z,"/") >= 2) {
+ a = "@" z[1] "/" z[2]
+ print "+" length(a) "," length(y[1]) ":" a "->" y[1]
+ for (i = 1;i <= f;i += 1) {
+ if (i != 2) {
+ a = y[i] "/" z[2]
+ print "+" length(a) "," length(z[1]) ":" a "->" z[1]
+ }
+ }
+ }
+ }
+ }
+ }
+ END {
+ print ""
+ }
+' | HOME/bin/cdbmake "$@"