aboutsummaryrefslogtreecommitdiffstats
path: root/.parse-deps.sed
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2021-08-05 11:27:24 +0100
committerTomasz Kramkowski <tk@the-tk.com>2021-08-05 11:27:24 +0100
commit1bfd9a05a71e3ec729b65ff040a2496b7b1f8a23 (patch)
tree77730ef41c413780f72bf671d35dd972bd47d351 /.parse-deps.sed
parent68b64352f02980b3b5a7ea47886e95151164c5a4 (diff)
downloadpack-1bfd9a05a71e3ec729b65ff040a2496b7b1f8a23.tar.gz
pack-1bfd9a05a71e3ec729b65ff040a2496b7b1f8a23.tar.xz
pack-1bfd9a05a71e3ec729b65ff040a2496b7b1f8a23.zip
.parse-deps: No longer executable, called with sed -f
as #!/usr/bin/sed is not portable, it is easier to just use sed -f
Diffstat (limited to '.parse-deps.sed')
-rw-r--r--.parse-deps.sed16
1 files changed, 16 insertions, 0 deletions
diff --git a/.parse-deps.sed b/.parse-deps.sed
new file mode 100644
index 0000000..488782d
--- /dev/null
+++ b/.parse-deps.sed
@@ -0,0 +1,16 @@
+# remove target
+1s/^[^:]*: //
+# collapse lines
+:loop
+/\\$/ {
+ s|///*|/|g
+ s|$|//|
+ N
+ s|\\//. *||
+ b loop
+}
+# split on unescaped spaces
+s/\([^\]\) */\1\
+/g
+# unescape spaces
+s/\\ / /g