aboutsummaryrefslogtreecommitdiff
path: root/sourcesFromSbt.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sourcesFromSbt.sh')
-rwxr-xr-xsourcesFromSbt.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/sourcesFromSbt.sh b/sourcesFromSbt.sh
new file mode 100755
index 00000000..e2b6a170
--- /dev/null
+++ b/sourcesFromSbt.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Parse the output of:
+# sbt "show compile:sources compile:resources".
+#
+# Set the field delimiter to any of '(', ',', or ')'
+# and split lines beginning with:
+# [info] ArrayBuffer(
+# [info] List(
+# throwing away the initial 'field' up to and including the '('.
+gawk -F '\\(|,|\\)' '/\[info\]\s+((ArrayBuffer)|(List))\(/ { $1 = ""; print $0 }'