More error handling.

This commit is contained in:
2026-04-20 16:57:39 +01:00
parent bff7796f69
commit cec88c7b68

View File

@@ -165,6 +165,7 @@ EOF
EOF
)"
done < <(my_curl)
if [ "$portfolio_index" ]; then
portfolio_index="$(
cat <<EOF
<!DOCTYPE html>
@@ -220,6 +221,7 @@ li.language {
EOF
)"
echo "$portfolio_index" > "$tmp_portfolio/index.html"
fi
if [ -d "$directory" ]; then
if [ "$(du -sb "$directory" | cut -f1)" -gt $((1024 * 1024 * 400)) ]; then
echo "Error: Directory '$directory' contains more than 400MB of data. Exiting to prevent data loss."