shellcheck fix

This commit is contained in:
Tobias Powalowski 2024-06-08 08:03:43 +02:00
parent 52f29ffeba
commit 132809349d

View file

@ -455,7 +455,7 @@ _mkfs() {
if echo "${1}" | grep -q '^/dev'; then if echo "${1}" | grep -q '^/dev'; then
mkswap -L "${6}" "${1}" &>"${_LOG}" || : >/tmp/.mp-error mkswap -L "${6}" "${1}" &>"${_LOG}" || : >/tmp/.mp-error
else else
[[ -d $(dirname "${3}${1}") ]] || mkdir -p $(dirname "${3}${1}") [[ -d $(dirname "${3}${1}") ]] || mkdir -p "$(dirname "${3}${1}")"
# remove existing swap file # remove existing swap file
[[ -f "${3}${1}" ]] && rm "${3}${1}" [[ -f "${3}${1}" ]] && rm "${3}${1}"
# btrfs needs NO_COW attribute # btrfs needs NO_COW attribute