Updated to latest archive and modified udev install message.
[archnosh.git] / scriptletbuilder.sh
bloba45636635ed6752b8d457fcc200a39e75027f3f4
1 #!/bin/sh -e
3 _buildinstall() {
5 local pkgpath="${srcdir}"/package/debian
7 for j in install upgrade remove
8 do
9 for k in pre_ post_
11 s="$k$j"
12 if test -r $pkgpath/"$1"."$s" # specific install script
13 then
14 echo "$s() {"
15 echo
16 sed -e 's/^/ /' $pkgpath/"$1"."$s"
17 echo
18 echo "}"
19 echo
20 elif test -r $pkgpath/"$1".p # bundle-based install
21 then
22 if test -r $pkgpath/"$s".funcs
23 then
24 echo "$s() {"
25 echo
26 if >/dev/null expr "$1" : "nosh-run-"
27 then
28 echo " nosh_run_package=YES"
29 echo
31 sed -e 's/^/ /' $pkgpath/"$s".funcs
32 echo
33 if test -r $pkgpath/"$1"."$s".extra
34 then
35 sed -e 's/^/ /' $pkgpath/"$1"."$s".extra
37 echo
38 sed -e 's/^/ /' $pkgpath/"$1".p
39 echo
40 echo "}"
41 echo
44 done
45 done