dot

packages and services management
Log | Files | Refs | README

commit 42ec0a1714fa5fc9df6a288fa7114bf71c41fcd3
parent 8943744aa8fa495f56c4dd00a2f74a6fd0650d2a
Author: Josuah Demangeon <mail@josuah.net>
Date:   Fri,  7 Dec 2018 01:32:24 +0100

bin/service-build: remove the directory if it is invalid

Diffstat:
Mbin/service-build | 20+++++++++-----------
As6/vtund/glaphyrae/env/HOST | 1+
2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/bin/service-build b/bin/service-build @@ -1,13 +1,15 @@ #!/usr/bin/env execlineb -if { mkdir -p /var/s6 } cd /var/s6 +elgetpositionals +if { mkdir -p /var/s6 } +cd /var/s6 -forbacktickx -o 0 -0 x { dollarat -0 } +forx -o 0 x { ${@} } importas sv x -backtick -n x { heredoc 0 $sv cut -d , -f 1 } +backtick -n x { heredoc 0 ${sv} cut -d , -f 1 } importas base x -backtick -n x { heredoc 0 $sv cut -s -d , -f 2- } +backtick -n x { heredoc 0 ${sv} cut -s -d , -f 2- } importas -s -d , mod x redirfd -r 0 /etc/s6/${base}/x/type @@ -18,19 +20,15 @@ if { cd /etc/s6/${base} redirfd -w 1 /dev/null ls x ${mod} } if { rm -rf ${sv} ${sv},log } -if { - forx -o 0 x { x $mod } importas x x - s6-hiercopy /etc/s6/${base}/${x} ${sv} -} - if { if -t { test $type = bundle } forbacktickx -n -d "\n" x { sed "s/^#.*//; /^[ \t]*$/ d" ${sv}/contents } importas x x - service-build $x + service-build ${x} } -if { if -t { test $type = longrun } +if { if -t { test ${type} = longrun } + ifte { } { rm -rf ${sv} ${sv},log } ifthenelse { test -d /etc/s6/${sv}/log } { s6-hiercopy /etc/s6/${sv}/log ${sv},log } { s6-hiercopy /etc/s6/.s6-rc/service-log ${sv},log } diff --git a/s6/vtund/glaphyrae/env/HOST b/s6/vtund/glaphyrae/env/HOST @@ -0,0 +1 @@ +199.247.28.162