aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/app.sed
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2014-03-29 13:21:11 +0100
committerAnders Svensson <[email protected]>2014-03-31 16:43:10 +0200
commit1106d1e478f979cd201a66d3180a4511bfa56a93 (patch)
tree204c12a9ce87efc5555a84cce33083d9d90abb0d /lib/diameter/src/app.sed
parent9feffa030c4d1791f76e5b57658945c013df636d (diff)
downloadotp-1106d1e478f979cd201a66d3180a4511bfa56a93.tar.gz
otp-1106d1e478f979cd201a66d3180a4511bfa56a93.tar.bz2
otp-1106d1e478f979cd201a66d3180a4511bfa56a93.zip
Generate runtime_dependencies in app file
To avoid having to specify applications more than once.
Diffstat (limited to 'lib/diameter/src/app.sed')
-rw-r--r--lib/diameter/src/app.sed40
1 files changed, 40 insertions, 0 deletions
diff --git a/lib/diameter/src/app.sed b/lib/diameter/src/app.sed
new file mode 100644
index 0000000000..7916f65002
--- /dev/null
+++ b/lib/diameter/src/app.sed
@@ -0,0 +1,40 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2014. All Rights Reserved.
+#
+# The contents of this file are subject to the Erlang Public License,
+# Version 1.1, (the "License"); you may not use this file except in
+# compliance with the License. You should have received a copy of the
+# Erlang Public License along with this software. If not, it can be
+# retrieved online at http://www.erlang.org/.
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+# the License for the specific language governing rights and limitations
+# under the License.
+#
+# %CopyrightEnd%
+
+#
+# Generate runtime_dependencies from applications to avoid having to
+# specify the same application more than once.
+#
+
+/{runtime_dependencies,/b v
+/{[-a-z]*, "[0-9.]*"}/!b
+/{vsn,/b
+
+/%%/!H
+s/{\([^,]*\)[^}]*}/\1/g
+s/%%/%,/
+b
+
+:v
+
+p
+x
+s/\n//
+s/%//g
+s/\n */ /g
+s/{\([^,]*\), "\([^"]*"\)}/"\1-\2/g