abuild: Add default split OpenRC function
This commit is contained in:
parent
829a501de7
commit
a74359e8e2
19
abuild.in
19
abuild.in
@ -1638,6 +1638,25 @@ libs() {
|
|||||||
default_libs
|
default_libs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# predefined splitfunc openrc
|
||||||
|
default_openrc() {
|
||||||
|
pkgdesc="$pkgdesc (OpenRC init scripts)"
|
||||||
|
install_if="openrc $pkgname=$pkgver-r$pkgrel"
|
||||||
|
local dir file
|
||||||
|
for dir in conf.d init.d; do
|
||||||
|
if [ -d "$pkgdir/etc/$dir" ]; then
|
||||||
|
mkdir -p "$subpkgdir"/etc
|
||||||
|
mv "$pkgdir/etc/$dir" "$subpkgdir"/etc/
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
openrc() {
|
||||||
|
default_openrc
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
is_function() {
|
is_function() {
|
||||||
type "$1" 2>&1 | head -n 1 | egrep -q "is a (shell )?function"
|
type "$1" 2>&1 | head -n 1 | egrep -q "is a (shell )?function"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user