summaryrefslogtreecommitdiffstats
path: root/meta/packages/meta/run-postinsts/run-postinsts.awk
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/meta/run-postinsts/run-postinsts.awk')
-rw-r--r--meta/packages/meta/run-postinsts/run-postinsts.awk25
1 files changed, 25 insertions, 0 deletions
diff --git a/meta/packages/meta/run-postinsts/run-postinsts.awk b/meta/packages/meta/run-postinsts/run-postinsts.awk
new file mode 100644
index 0000000000..1532577b6e
--- /dev/null
+++ b/meta/packages/meta/run-postinsts/run-postinsts.awk
@@ -0,0 +1,25 @@
1#
2# Copyright 2007 Openedhand Ltd.
3#
4# Author: Richard Purdie <rpurdie@openedhand.com>
5#
6# Rather hacky proof of concept
7#
8
9BEGIN {
10 package=""
11}
12/Package:.*/ {
13 package = substr($0, 10)
14}
15/Status:.*unpacked.*/ {
16 print "Configuring: " package > "/dev/stderr"
17 ret = system("/usr/lib/ipkg/info/" package ".postinst 1>&2")
18 if (ret == 0)
19 $0 = gensub("unpacked", "installed", 1)
20 else
21 print "Postinstall failed for " package > "/dev/stderr"
22}
23{
24 print $0
25}