diff --git a/beta/php7.3/apache/docker-entrypoint.sh b/beta/php7.3/apache/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/beta/php7.3/apache/docker-entrypoint.sh +++ b/beta/php7.3/apache/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi diff --git a/beta/php7.3/fpm-alpine/docker-entrypoint.sh b/beta/php7.3/fpm-alpine/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/beta/php7.3/fpm-alpine/docker-entrypoint.sh +++ b/beta/php7.3/fpm-alpine/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi diff --git a/beta/php7.3/fpm/docker-entrypoint.sh b/beta/php7.3/fpm/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/beta/php7.3/fpm/docker-entrypoint.sh +++ b/beta/php7.3/fpm/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi diff --git a/beta/php7.4/apache/docker-entrypoint.sh b/beta/php7.4/apache/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/beta/php7.4/apache/docker-entrypoint.sh +++ b/beta/php7.4/apache/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi diff --git a/beta/php7.4/fpm-alpine/docker-entrypoint.sh b/beta/php7.4/fpm-alpine/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/beta/php7.4/fpm-alpine/docker-entrypoint.sh +++ b/beta/php7.4/fpm-alpine/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi diff --git a/beta/php7.4/fpm/docker-entrypoint.sh b/beta/php7.4/fpm/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/beta/php7.4/fpm/docker-entrypoint.sh +++ b/beta/php7.4/fpm/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi diff --git a/beta/php8.0/apache/docker-entrypoint.sh b/beta/php8.0/apache/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/beta/php8.0/apache/docker-entrypoint.sh +++ b/beta/php8.0/apache/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi diff --git a/beta/php8.0/fpm-alpine/docker-entrypoint.sh b/beta/php8.0/fpm-alpine/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/beta/php8.0/fpm-alpine/docker-entrypoint.sh +++ b/beta/php8.0/fpm-alpine/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi diff --git a/beta/php8.0/fpm/docker-entrypoint.sh b/beta/php8.0/fpm/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/beta/php8.0/fpm/docker-entrypoint.sh +++ b/beta/php8.0/fpm/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi diff --git a/latest/php7.3/apache/docker-entrypoint.sh b/latest/php7.3/apache/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/latest/php7.3/apache/docker-entrypoint.sh +++ b/latest/php7.3/apache/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi diff --git a/latest/php7.3/fpm-alpine/docker-entrypoint.sh b/latest/php7.3/fpm-alpine/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/latest/php7.3/fpm-alpine/docker-entrypoint.sh +++ b/latest/php7.3/fpm-alpine/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi diff --git a/latest/php7.3/fpm/docker-entrypoint.sh b/latest/php7.3/fpm/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/latest/php7.3/fpm/docker-entrypoint.sh +++ b/latest/php7.3/fpm/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi diff --git a/latest/php7.4/apache/docker-entrypoint.sh b/latest/php7.4/apache/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/latest/php7.4/apache/docker-entrypoint.sh +++ b/latest/php7.4/apache/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi diff --git a/latest/php7.4/fpm-alpine/docker-entrypoint.sh b/latest/php7.4/fpm-alpine/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/latest/php7.4/fpm-alpine/docker-entrypoint.sh +++ b/latest/php7.4/fpm-alpine/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi diff --git a/latest/php7.4/fpm/docker-entrypoint.sh b/latest/php7.4/fpm/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/latest/php7.4/fpm/docker-entrypoint.sh +++ b/latest/php7.4/fpm/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi diff --git a/latest/php8.0/apache/docker-entrypoint.sh b/latest/php8.0/apache/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/latest/php8.0/apache/docker-entrypoint.sh +++ b/latest/php8.0/apache/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi diff --git a/latest/php8.0/fpm-alpine/docker-entrypoint.sh b/latest/php8.0/fpm-alpine/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/latest/php8.0/fpm-alpine/docker-entrypoint.sh +++ b/latest/php8.0/fpm-alpine/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi diff --git a/latest/php8.0/fpm/docker-entrypoint.sh b/latest/php8.0/fpm/docker-entrypoint.sh index 74551b510a..4c7bbf88f6 100755 --- a/latest/php8.0/fpm/docker-entrypoint.sh +++ b/latest/php8.0/fpm/docker-entrypoint.sh @@ -51,11 +51,14 @@ if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then fi # loop over "pluggable" content in the source, and if it already exists in the destination, skip it # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded) - for contentDir in /usr/src/wordpress/wp-content/*/*/; do + for contentDir in \ + /usr/src/wordpress/.htaccess \ + /usr/src/wordpress/wp-content/*/*/ \ + ; do contentDir="${contentDir%/}" [ -d "$contentDir" ] || continue contentPath="${contentDir#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc. - if [ -d "$PWD/$contentPath" ]; then + if [ -e "$PWD/$contentPath" ]; then echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)" sourceTarArgs+=( --exclude "./$contentPath" ) fi