More error handling.
This commit is contained in:
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user