meta:archive: Use stderr for log messages
This commit is contained in:
@@ -49,15 +49,15 @@ for file in "${to_archive[@]}"; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if rmdir "$tmpd" 2>/dev/null; then
|
if rmdir "$tmpd" 2>/dev/null; then
|
||||||
echo "Nothing to archive"
|
>&2 echo "Nothing to archive"
|
||||||
else
|
else
|
||||||
name="existing-$(date +"%Y%m%d_%H%M%S").tar.gz"
|
name="existing-$(date +"%Y%m%d_%H%M%S").tar.gz"
|
||||||
if tar czvf "$name" "$tmpd"; then
|
if tar czvf "$name" "$tmpd"; then
|
||||||
rm -rf "$tmpd"
|
rm -rf "$tmpd"
|
||||||
echo "$name created"
|
>&2 echo "$name created"
|
||||||
else
|
else
|
||||||
errc=$?
|
errc=$?
|
||||||
echo "Archive could not be created. See $tmpd."
|
>&2 echo "Archive could not be created. See $tmpd."
|
||||||
exit $errc
|
exit $errc
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user