Skip to main content

We can’t move the cover image without a review

ID
b6538d8
date
2024-01-07 20:14:40+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
47af881
message
We can't move the cover image without a review
changed files
1 file, 7 additions

Changed files

images/move_cover_image (685) → images/move_cover_image (811)

diff --git a/images/move_cover_image b/images/move_cover_image
index ba63c64..1ad5f9b 100755
--- a/images/move_cover_image
+++ b/images/move_cover_image
@@ -9,6 +9,13 @@ set -o nounset
 LATEST_DOWNLOAD=$(latest_download)
 LATEST_REVIEW=$(git ls-files -o --exclude-standard)
 echo "$LATEST_DOWNLOAD"
+
+if [[ "$LATEST_REVIEW" = "" ]]
+then
+  echo "Please create the review file before you copy the cover image!" >&2
+  exit 1
+fi
+
 echo "$LATEST_REVIEW"
 
 filename=$(basename -- "$LATEST_REVIEW" .md)