diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2017-07-25 07:16:23 -0500 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2017-07-26 16:00:12 +0000 |
commit | a74359e8e20815b4b502524d944b67ac3dbaabd6 (patch) | |
tree | 048c38fc8604070fca389e20ca7bee7ae0a48961 | |
parent | 829a501de758c5226b1aae27ecb0d95bc3b6db6b (diff) | |
download | abuild-a74359e8e20815b4b502524d944b67ac3dbaabd6.tar.gz abuild-a74359e8e20815b4b502524d944b67ac3dbaabd6.tar.bz2 abuild-a74359e8e20815b4b502524d944b67ac3dbaabd6.tar.xz abuild-a74359e8e20815b4b502524d944b67ac3dbaabd6.zip |
abuild: Add default split OpenRC function
-rw-r--r-- | abuild.in | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -1638,6 +1638,25 @@ 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() { type "$1" 2>&1 | head -n 1 | egrep -q "is a (shell )?function" } |