diff --git a/src/images_copy.sh b/src/images_copy.sh index 40e64d4..50b80e0 100755 --- a/src/images_copy.sh +++ b/src/images_copy.sh @@ -1,13 +1,13 @@ #!/bin/bash __target='./static/images/reduced/clickbait' -__source='../blog-images/dirs/clickbait/reduced/' +__source='../blog-images/dirs/clickbait/reduced' if [ -d "${__target}" ]; then rm -r "${__target}" fi -mkdir -p "${__target}" +mkdir -p "$(dirname "${__target}")" cp -r "${__source}" "${__target}" diff --git a/update.sh b/update.sh index 2da3b39..d02efa3 100755 --- a/update.sh +++ b/update.sh @@ -2,6 +2,10 @@ git pull --recurse-submodules +if [ -d './static/images/reduced/' ]; then + rm -r './static/images/reduced/' +fi + if [ -d './static/images/generated/' ]; then rm -r './static/images/generated/' fi