meta:archive: Use stderr for log messages

This commit is contained in:
2022-03-31 03:11:32 +02:00
parent 98b33cc615
commit 82a4dc8e19

View File

@@ -49,15 +49,15 @@ for file in "${to_archive[@]}"; do
done
if rmdir "$tmpd" 2>/dev/null; then
echo "Nothing to archive"
>&2 echo "Nothing to archive"
else
name="existing-$(date +"%Y%m%d_%H%M%S").tar.gz"
if tar czvf "$name" "$tmpd"; then
rm -rf "$tmpd"
echo "$name created"
>&2 echo "$name created"
else
errc=$?
echo "Archive could not be created. See $tmpd."
>&2 echo "Archive could not be created. See $tmpd."
exit $errc
fi
fi