From 33fd83f6beb7d1e5b1c2121cf685ce78af8b4fc2 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Mon, 13 Oct 2014 11:03:14 +0200 Subject: [PATCH] common/environment/setup: add vsv command to add runit services. --- common/environment/setup/install.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/common/environment/setup/install.sh b/common/environment/setup/install.sh index 86394ead5c..9a5ec82c26 100644 --- a/common/environment/setup/install.sh +++ b/common/environment/setup/install.sh @@ -13,10 +13,22 @@ _noglob_helper() { } # Apply _noglob to v* commands -for cmd in vinstall vcopy vmove vmkdir vbin vman vdoc vconf vsconf vlicense; do +for cmd in vinstall vcopy vmove vmkdir vbin vman vdoc vconf vsconf vlicense vsv; do alias ${cmd}="set -f; _noglob_helper _${cmd}" done +_vsv() { + local service="$1" + + if [ $# -lt 1 ]; then + msg_red "$pkgver: vsv: 1 argument expected: \n" + return 1 + fi + + vmkdir etc/sv + vcopy "${FILESDIR}/$service" etc/sv +} + _vbin() { local file="$1" targetfile="$2"