sequencer - addconf: allow empty source and fix printf missing newline

This commit is contained in:
2022-08-12 18:05:33 +02:00
parent b97f880b2a
commit e289f37be2

View File

@@ -866,7 +866,7 @@ addConf() {
esac
done
local source="${1:?}"
local source="${1:-}"
local dest="${2:?}"
if [ "${transferCmd}" == "cat" ] && [ ! -f "${source}" ] ; then
@@ -905,7 +905,7 @@ addConf() {
else
"${transferCmd}" "${source}" >> "${dest}"
fi
sqr::printf 'ok\n [i] %s' "Existing config saved to ${addConfBackup}"
sqr::printf 'ok\n [i] %s\n' "Existing config saved to ${addConfBackup}"
return 0
else
sqr::echo "nok"