sequencer - addconf: allow empty source and fix printf missing newline
This commit is contained in:
@@ -866,7 +866,7 @@ addConf() {
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
local source="${1:?}"
|
local source="${1:-}"
|
||||||
local dest="${2:?}"
|
local dest="${2:?}"
|
||||||
|
|
||||||
if [ "${transferCmd}" == "cat" ] && [ ! -f "${source}" ] ; then
|
if [ "${transferCmd}" == "cat" ] && [ ! -f "${source}" ] ; then
|
||||||
@@ -905,7 +905,7 @@ addConf() {
|
|||||||
else
|
else
|
||||||
"${transferCmd}" "${source}" >> "${dest}"
|
"${transferCmd}" "${source}" >> "${dest}"
|
||||||
fi
|
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
|
return 0
|
||||||
else
|
else
|
||||||
sqr::echo "nok"
|
sqr::echo "nok"
|
||||||
|
Reference in New Issue
Block a user