From: Michael Tremer Date: Tue, 11 Apr 2023 12:28:43 +0000 (+0000) Subject: macros: Fix coding style of sysusers macro X-Git-Tag: 0.9.29~200 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2d80235709abf207726f0d7052c71dcc90aa606a;p=pakfire.git macros: Fix coding style of sysusers macro Signed-off-by: Michael Tremer --- diff --git a/macros/systemd.macro b/macros/systemd.macro index 8624579b5..79b443666 100644 --- a/macros/systemd.macro +++ b/macros/systemd.macro @@ -2,13 +2,10 @@ build export APPLY_SYSUSERS_FILE = %{DIR_SOURCE}/*.sysusers MACRO_APPLY_SYSTEMD_SYSUSERS - if [ -n "$APPLY_SYSUSERS_FILE" ] && [ -x "$(command -v systemd-sysusers)" ]; then - mkdir -pv %{sysusersdir} - + if [ -n "${APPLY_SYSUSERS_FILE}" ] && [ -x "$(command -v systemd-sysusers)" ]; then for file in ${APPLY_SYSUSERS_FILE}; do [ -e "${file}" ] || continue - cat ${file} | \ - systemd-sysusers --replace=%{sysusersdir}/$(basename ${file%*.*}).conf - + systemd-sysusers --replace="%{sysusersdir}/$(basename ${file%*.*}).conf" - < "${file}" done unset file fi