manr: fix
[copyleftie-scripts.git] / sv
blob0a347e063cd8ce3c955904780a5ff580b7c35f71
1 #!/bin/execlineb -W
3 backtick -in sv { defwhich sv }
4 multisubstitute {
5         importas home home
6         importas -u sv sv
7         importas -u ctrl 1
9 shift
10 elgetpositionals -P1
12 # TODO
13 #       ? doas ${sv} ${ctrl} ${@}, where ${@} is the paramaters but modified
14 #       ? background { ${sv} ${ctrl} ${nonroots} } doas ${sv} ${ctrl} ${roots}
15 forx -p s { ${@} }
16         importas -u s s
17         ifelse { test -e ${home}/service/${s} } {
18                 ${sv} ${ctrl} ${home}/service/${s}
19         }
20                 doas ${sv} ${ctrl} ${s}