Skip to content

Commit 7eddfb9

Browse files
authored
Merge pull request #197 from infosiftr/double-spaces
Fix Windows-newlines sed to not create a double-spaced file
2 parents 537363a + 19b5789 commit 7eddfb9

10 files changed

+10
-10
lines changed

docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
7272
# version 4.4.1 decided to switch to windows line endings, that breaks our seds and awks
7373
# https://github.com/docker-library/wordpress/issues/116
7474
# https://github.com/WordPress/WordPress/commit/1acedc542fba2482bab88ec70d4bea4b997a92e4
75-
sed -ri -e 's/\r\n|\r/\n/g' wp-config*
75+
sed -ri -e 's/\r$//' wp-config*
7676

7777
if [ ! -e wp-config.php ]; then
7878
awk '/^\/\*.*stop editing.*\*\/$/ && c == 0 { c = 1; system("cat") } { print }' wp-config-sample.php > wp-config.php <<'EOPHP'

php5.6/apache/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
7272
# version 4.4.1 decided to switch to windows line endings, that breaks our seds and awks
7373
# https://github.com/docker-library/wordpress/issues/116
7474
# https://github.com/WordPress/WordPress/commit/1acedc542fba2482bab88ec70d4bea4b997a92e4
75-
sed -ri -e 's/\r\n|\r/\n/g' wp-config*
75+
sed -ri -e 's/\r$//' wp-config*
7676

7777
if [ ! -e wp-config.php ]; then
7878
awk '/^\/\*.*stop editing.*\*\/$/ && c == 0 { c = 1; system("cat") } { print }' wp-config-sample.php > wp-config.php <<'EOPHP'

php5.6/fpm-alpine/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
7272
# version 4.4.1 decided to switch to windows line endings, that breaks our seds and awks
7373
# https://github.com/docker-library/wordpress/issues/116
7474
# https://github.com/WordPress/WordPress/commit/1acedc542fba2482bab88ec70d4bea4b997a92e4
75-
sed -ri -e 's/\r\n|\r/\n/g' wp-config*
75+
sed -ri -e 's/\r$//' wp-config*
7676

7777
if [ ! -e wp-config.php ]; then
7878
awk '/^\/\*.*stop editing.*\*\/$/ && c == 0 { c = 1; system("cat") } { print }' wp-config-sample.php > wp-config.php <<'EOPHP'

php5.6/fpm/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
7272
# version 4.4.1 decided to switch to windows line endings, that breaks our seds and awks
7373
# https://github.com/docker-library/wordpress/issues/116
7474
# https://github.com/WordPress/WordPress/commit/1acedc542fba2482bab88ec70d4bea4b997a92e4
75-
sed -ri -e 's/\r\n|\r/\n/g' wp-config*
75+
sed -ri -e 's/\r$//' wp-config*
7676

7777
if [ ! -e wp-config.php ]; then
7878
awk '/^\/\*.*stop editing.*\*\/$/ && c == 0 { c = 1; system("cat") } { print }' wp-config-sample.php > wp-config.php <<'EOPHP'

php7.0/apache/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
7272
# version 4.4.1 decided to switch to windows line endings, that breaks our seds and awks
7373
# https://github.com/docker-library/wordpress/issues/116
7474
# https://github.com/WordPress/WordPress/commit/1acedc542fba2482bab88ec70d4bea4b997a92e4
75-
sed -ri -e 's/\r\n|\r/\n/g' wp-config*
75+
sed -ri -e 's/\r$//' wp-config*
7676

7777
if [ ! -e wp-config.php ]; then
7878
awk '/^\/\*.*stop editing.*\*\/$/ && c == 0 { c = 1; system("cat") } { print }' wp-config-sample.php > wp-config.php <<'EOPHP'

php7.0/fpm-alpine/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
7272
# version 4.4.1 decided to switch to windows line endings, that breaks our seds and awks
7373
# https://github.com/docker-library/wordpress/issues/116
7474
# https://github.com/WordPress/WordPress/commit/1acedc542fba2482bab88ec70d4bea4b997a92e4
75-
sed -ri -e 's/\r\n|\r/\n/g' wp-config*
75+
sed -ri -e 's/\r$//' wp-config*
7676

7777
if [ ! -e wp-config.php ]; then
7878
awk '/^\/\*.*stop editing.*\*\/$/ && c == 0 { c = 1; system("cat") } { print }' wp-config-sample.php > wp-config.php <<'EOPHP'

php7.0/fpm/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
7272
# version 4.4.1 decided to switch to windows line endings, that breaks our seds and awks
7373
# https://github.com/docker-library/wordpress/issues/116
7474
# https://github.com/WordPress/WordPress/commit/1acedc542fba2482bab88ec70d4bea4b997a92e4
75-
sed -ri -e 's/\r\n|\r/\n/g' wp-config*
75+
sed -ri -e 's/\r$//' wp-config*
7676

7777
if [ ! -e wp-config.php ]; then
7878
awk '/^\/\*.*stop editing.*\*\/$/ && c == 0 { c = 1; system("cat") } { print }' wp-config-sample.php > wp-config.php <<'EOPHP'

php7.1/apache/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
7272
# version 4.4.1 decided to switch to windows line endings, that breaks our seds and awks
7373
# https://github.com/docker-library/wordpress/issues/116
7474
# https://github.com/WordPress/WordPress/commit/1acedc542fba2482bab88ec70d4bea4b997a92e4
75-
sed -ri -e 's/\r\n|\r/\n/g' wp-config*
75+
sed -ri -e 's/\r$//' wp-config*
7676

7777
if [ ! -e wp-config.php ]; then
7878
awk '/^\/\*.*stop editing.*\*\/$/ && c == 0 { c = 1; system("cat") } { print }' wp-config-sample.php > wp-config.php <<'EOPHP'

php7.1/fpm-alpine/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
7272
# version 4.4.1 decided to switch to windows line endings, that breaks our seds and awks
7373
# https://github.com/docker-library/wordpress/issues/116
7474
# https://github.com/WordPress/WordPress/commit/1acedc542fba2482bab88ec70d4bea4b997a92e4
75-
sed -ri -e 's/\r\n|\r/\n/g' wp-config*
75+
sed -ri -e 's/\r$//' wp-config*
7676

7777
if [ ! -e wp-config.php ]; then
7878
awk '/^\/\*.*stop editing.*\*\/$/ && c == 0 { c = 1; system("cat") } { print }' wp-config-sample.php > wp-config.php <<'EOPHP'

php7.1/fpm/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
7272
# version 4.4.1 decided to switch to windows line endings, that breaks our seds and awks
7373
# https://github.com/docker-library/wordpress/issues/116
7474
# https://github.com/WordPress/WordPress/commit/1acedc542fba2482bab88ec70d4bea4b997a92e4
75-
sed -ri -e 's/\r\n|\r/\n/g' wp-config*
75+
sed -ri -e 's/\r$//' wp-config*
7676

7777
if [ ! -e wp-config.php ]; then
7878
awk '/^\/\*.*stop editing.*\*\/$/ && c == 0 { c = 1; system("cat") } { print }' wp-config-sample.php > wp-config.php <<'EOPHP'

0 commit comments

Comments
 (0)