mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
plugins: add double-quotes to fix handling files with spaces (#4187)
This commit is contained in:
parent
405fb2e263
commit
8af0c12f9c
1 changed files with 6 additions and 6 deletions
|
|
@ -211,7 +211,7 @@ scripts-post:
|
|||
install: check
|
||||
@mkdir -p ${DESTDIR}${LOCALBASE}/opnsense/version
|
||||
@(cd ${.CURDIR}/src 2> /dev/null && find * -type f) | while read FILE; do \
|
||||
tar -C ${.CURDIR}/src -cpf - $${FILE} | \
|
||||
tar -C ${.CURDIR}/src -cpf - "$${FILE}" | \
|
||||
tar -C ${DESTDIR}${LOCALBASE} -xpf -; \
|
||||
if [ "$${FILE%%.in}" != "$${FILE}" ]; then \
|
||||
sed -i '' ${SED_REPLACE} "${DESTDIR}${LOCALBASE}/$${FILE}"; \
|
||||
|
|
@ -253,17 +253,17 @@ metadata: check
|
|||
|
||||
collect: check
|
||||
@(cd ${.CURDIR}/src 2> /dev/null && find * -type f) | while read FILE; do \
|
||||
tar -C ${DESTDIR}${LOCALBASE} -cpf - $${FILE} | \
|
||||
tar -C ${DESTDIR}${LOCALBASE} -cpf - "$${FILE}" | \
|
||||
tar -C ${.CURDIR}/src -xpf -; \
|
||||
done
|
||||
|
||||
remove: check
|
||||
@(cd ${.CURDIR}/src 2> /dev/null && find * -type f) | while read FILE; do \
|
||||
rm -f ${DESTDIR}${LOCALBASE}/$${FILE}; \
|
||||
rm -f "${DESTDIR}${LOCALBASE}/$${FILE}"; \
|
||||
done
|
||||
@(cd ${.CURDIR}/src 2> /dev/null && find * -type d -depth) | while read DIR; do \
|
||||
if [ -d ${DESTDIR}${LOCALBASE}/$${DIR} ]; then \
|
||||
rmdir ${DESTDIR}${LOCALBASE}/$${DIR} 2> /dev/null || true; \
|
||||
if [ -d "${DESTDIR}${LOCALBASE}/$${DIR}" ]; then \
|
||||
rmdir "${DESTDIR}${LOCALBASE}/$${DIR}" 2> /dev/null || true; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
|
|
@ -324,7 +324,7 @@ lint-shell:
|
|||
if [ "$$(head $${FILE} | grep -c '^#!\/')" == "0" ]; then \
|
||||
echo "Missing shebang in $${FILE}"; exit 1; \
|
||||
fi; \
|
||||
sh -n $${FILE} || exit 1; \
|
||||
sh -n "$${FILE}" || exit 1; \
|
||||
done
|
||||
|
||||
lint-xml:
|
||||
|
|
|
|||
Loading…
Reference in a new issue