summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2023-01-02 23:01:38 +0100
committerDavid Seifert <soap@gentoo.org>2023-01-02 23:01:38 +0100
commit649cc28861ee5a66ef1eb5b1aafc2759a45bbe7d (patch)
tree5f1d9b130eff3091569edcdcdb55f55ebc5bd34a /eclass/s6.eclass
parents6.eclass: drop EAPI 5, 6 and 7 support (diff)
downloadgentoo-649cc28861ee5a66ef1eb5b1aafc2759a45bbe7d.tar.gz
gentoo-649cc28861ee5a66ef1eb5b1aafc2759a45bbe7d.tar.bz2
gentoo-649cc28861ee5a66ef1eb5b1aafc2759a45bbe7d.zip
s6.eclass: consistent style
Closes: https://github.com/gentoo/gentoo/pull/28912 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass/s6.eclass')
-rw-r--r--eclass/s6.eclass42
1 files changed, 20 insertions, 22 deletions
diff --git a/eclass/s6.eclass b/eclass/s6.eclass
index f4d7ebf2c31d..56b321f178f6 100644
--- a/eclass/s6.eclass
+++ b/eclass/s6.eclass
@@ -42,7 +42,7 @@ _s6_get_servicedir() {
# @DESCRIPTION:
# Output the path for the s6 service directory (not including ${D}).
s6_get_servicedir() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
echo "${EPREFIX}$(_s6_get_servicedir)"
}
@@ -55,22 +55,22 @@ s6_get_servicedir() {
# run is the run script for the service.
# finish is the optional finish script for the service.
s6_install_service() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local name="$1"
local run="$2"
local finish="$3"
- [[ $name ]] ||
+ [[ -z ${name} ]] &&
die "${ECLASS}.eclass: you must specify the s6 service name"
- [[ $run ]] ||
+ [[ -z ${run} ]] &&
die "${ECLASS}.eclass: you must specify the s6 service run script"
(
- local servicepath="$(_s6_get_servicedir)/$name"
- exeinto "$servicepath"
- newexe "$run" run
- [[ $finish ]] && newexe "$finish" finish
+ local servicepath="$(_s6_get_servicedir)/${name}"
+ exeinto "${servicepath}"
+ newexe "${run}" run
+ [[ -n ${finish} ]] && newexe "${finish}" finish
)
}
@@ -81,18 +81,17 @@ s6_install_service() {
# default.
# servicename is the name of the service.
s6_service_down() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local name="$1"
-
- [[ $name ]] ||
+ [[ -z ${name} ]] &&
die "${ECLASS}.eclass: you must specify the s6 service name"
(
- touch "$T"/down || die
- local servicepath="$(_s6_get_servicedir)/$name"
- insinto "$servicepath"
- doins "$T"/down
+ touch "${T}"/down || die
+ local servicepath="$(_s6_get_servicedir)/${name}"
+ insinto "${servicepath}"
+ doins "${T}"/down
)
}
@@ -103,17 +102,16 @@ s6_service_down() {
# leader.
# servicename is the name of the service.
s6_service_nosetsid() {
- debug-print-function ${FUNCNAME} "${@}"
+ debug-print-function ${FUNCNAME} "$@"
local name="$1"
-
- [[ $name ]] ||
+ [[ -z ${name} ]] &&
die "${ECLASS}.eclass: you must specify the s6 service name"
(
- touch "$T"/nosetsid || die
- local servicepath="$(_s6_get_servicedir)/$name"
- insinto "$servicepath"
- doins "$T"/nosetsid
+ touch "${T}"/nosetsid || die
+ local servicepath="$(_s6_get_servicedir)/${name}"
+ insinto "${servicepath}"
+ doins "${T}"/nosetsid
)
}