Skip to content

Commit 721f870

Browse files
authored
Merge pull request #334 from tyranron/322-subshell-fix
Remove subshell usage in docker-php-ext-install for Alpine
2 parents 9b4c15f + 1739456 commit 721f870

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+352
-330
lines changed

5.6/alpine/docker-php-ext-configure

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ if [ -z "$srcExists" ]; then
1010
touch /usr/src/php/.docker-delete-me
1111
fi
1212

13+
cd /usr/src/php/ext
14+
1315
ext="$1"
14-
extDir="/usr/src/php/ext/$ext"
15-
if [ -z "$ext" ] || [ ! -d "$extDir" ]; then
16+
if [ -z "$ext" ] || [ ! -d "$ext" ]; then
1617
echo >&2 "usage: $0 ext-name [configure flags]"
1718
echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something"
1819
echo >&2
@@ -46,6 +47,6 @@ if [ "$pm" = 'apk' ]; then
4647
fi
4748

4849
set -x
49-
cd "$extDir"
50+
cd "$ext"
5051
phpize
5152
./configure "$@"

5.6/alpine/docker-php-ext-install

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,19 @@ if [ "$pm" = 'apk' ]; then
8989
fi
9090
fi
9191

92+
popDir="$PWD"
9293
for ext in $exts; do
93-
(
94-
cd "$ext"
95-
[ -e Makefile ] || docker-php-ext-configure "$ext"
96-
make -j"$j"
97-
make -j"$j" install
98-
find modules \
99-
-maxdepth 1 \
100-
-name '*.so' \
101-
-exec basename '{}' ';' \
102-
| xargs -r docker-php-ext-enable
103-
make -j"$j" clean
104-
)
94+
cd "$ext"
95+
[ -e Makefile ] || docker-php-ext-configure "$ext"
96+
make -j"$j"
97+
make -j"$j" install
98+
find modules \
99+
-maxdepth 1 \
100+
-name '*.so' \
101+
-exec basename '{}' ';' \
102+
| xargs -r docker-php-ext-enable
103+
make -j"$j" clean
104+
cd "$popDir"
105105
done
106106

107107
if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then

5.6/apache/docker-php-ext-configure

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ if [ -z "$srcExists" ]; then
1010
touch /usr/src/php/.docker-delete-me
1111
fi
1212

13+
cd /usr/src/php/ext
14+
1315
ext="$1"
14-
extDir="/usr/src/php/ext/$ext"
15-
if [ -z "$ext" ] || [ ! -d "$extDir" ]; then
16+
if [ -z "$ext" ] || [ ! -d "$ext" ]; then
1617
echo >&2 "usage: $0 ext-name [configure flags]"
1718
echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something"
1819
echo >&2
@@ -46,6 +47,6 @@ if [ "$pm" = 'apk' ]; then
4647
fi
4748

4849
set -x
49-
cd "$extDir"
50+
cd "$ext"
5051
phpize
5152
./configure "$@"

5.6/apache/docker-php-ext-install

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,19 @@ if [ "$pm" = 'apk' ]; then
8989
fi
9090
fi
9191

92+
popDir="$PWD"
9293
for ext in $exts; do
93-
(
94-
cd "$ext"
95-
[ -e Makefile ] || docker-php-ext-configure "$ext"
96-
make -j"$j"
97-
make -j"$j" install
98-
find modules \
99-
-maxdepth 1 \
100-
-name '*.so' \
101-
-exec basename '{}' ';' \
102-
| xargs -r docker-php-ext-enable
103-
make -j"$j" clean
104-
)
94+
cd "$ext"
95+
[ -e Makefile ] || docker-php-ext-configure "$ext"
96+
make -j"$j"
97+
make -j"$j" install
98+
find modules \
99+
-maxdepth 1 \
100+
-name '*.so' \
101+
-exec basename '{}' ';' \
102+
| xargs -r docker-php-ext-enable
103+
make -j"$j" clean
104+
cd "$popDir"
105105
done
106106

107107
if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then

5.6/docker-php-ext-configure

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ if [ -z "$srcExists" ]; then
1010
touch /usr/src/php/.docker-delete-me
1111
fi
1212

13+
cd /usr/src/php/ext
14+
1315
ext="$1"
14-
extDir="/usr/src/php/ext/$ext"
15-
if [ -z "$ext" ] || [ ! -d "$extDir" ]; then
16+
if [ -z "$ext" ] || [ ! -d "$ext" ]; then
1617
echo >&2 "usage: $0 ext-name [configure flags]"
1718
echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something"
1819
echo >&2
@@ -46,6 +47,6 @@ if [ "$pm" = 'apk' ]; then
4647
fi
4748

4849
set -x
49-
cd "$extDir"
50+
cd "$ext"
5051
phpize
5152
./configure "$@"

5.6/docker-php-ext-install

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,19 @@ if [ "$pm" = 'apk' ]; then
8989
fi
9090
fi
9191

92+
popDir="$PWD"
9293
for ext in $exts; do
93-
(
94-
cd "$ext"
95-
[ -e Makefile ] || docker-php-ext-configure "$ext"
96-
make -j"$j"
97-
make -j"$j" install
98-
find modules \
99-
-maxdepth 1 \
100-
-name '*.so' \
101-
-exec basename '{}' ';' \
102-
| xargs -r docker-php-ext-enable
103-
make -j"$j" clean
104-
)
94+
cd "$ext"
95+
[ -e Makefile ] || docker-php-ext-configure "$ext"
96+
make -j"$j"
97+
make -j"$j" install
98+
find modules \
99+
-maxdepth 1 \
100+
-name '*.so' \
101+
-exec basename '{}' ';' \
102+
| xargs -r docker-php-ext-enable
103+
make -j"$j" clean
104+
cd "$popDir"
105105
done
106106

107107
if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then

5.6/fpm/alpine/docker-php-ext-configure

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ if [ -z "$srcExists" ]; then
1010
touch /usr/src/php/.docker-delete-me
1111
fi
1212

13+
cd /usr/src/php/ext
14+
1315
ext="$1"
14-
extDir="/usr/src/php/ext/$ext"
15-
if [ -z "$ext" ] || [ ! -d "$extDir" ]; then
16+
if [ -z "$ext" ] || [ ! -d "$ext" ]; then
1617
echo >&2 "usage: $0 ext-name [configure flags]"
1718
echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something"
1819
echo >&2
@@ -46,6 +47,6 @@ if [ "$pm" = 'apk' ]; then
4647
fi
4748

4849
set -x
49-
cd "$extDir"
50+
cd "$ext"
5051
phpize
5152
./configure "$@"

5.6/fpm/alpine/docker-php-ext-install

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,19 @@ if [ "$pm" = 'apk' ]; then
8989
fi
9090
fi
9191

92+
popDir="$PWD"
9293
for ext in $exts; do
93-
(
94-
cd "$ext"
95-
[ -e Makefile ] || docker-php-ext-configure "$ext"
96-
make -j"$j"
97-
make -j"$j" install
98-
find modules \
99-
-maxdepth 1 \
100-
-name '*.so' \
101-
-exec basename '{}' ';' \
102-
| xargs -r docker-php-ext-enable
103-
make -j"$j" clean
104-
)
94+
cd "$ext"
95+
[ -e Makefile ] || docker-php-ext-configure "$ext"
96+
make -j"$j"
97+
make -j"$j" install
98+
find modules \
99+
-maxdepth 1 \
100+
-name '*.so' \
101+
-exec basename '{}' ';' \
102+
| xargs -r docker-php-ext-enable
103+
make -j"$j" clean
104+
cd "$popDir"
105105
done
106106

107107
if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then

5.6/fpm/docker-php-ext-configure

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ if [ -z "$srcExists" ]; then
1010
touch /usr/src/php/.docker-delete-me
1111
fi
1212

13+
cd /usr/src/php/ext
14+
1315
ext="$1"
14-
extDir="/usr/src/php/ext/$ext"
15-
if [ -z "$ext" ] || [ ! -d "$extDir" ]; then
16+
if [ -z "$ext" ] || [ ! -d "$ext" ]; then
1617
echo >&2 "usage: $0 ext-name [configure flags]"
1718
echo >&2 " ie: $0 gd --with-jpeg-dir=/usr/local/something"
1819
echo >&2
@@ -46,6 +47,6 @@ if [ "$pm" = 'apk' ]; then
4647
fi
4748

4849
set -x
49-
cd "$extDir"
50+
cd "$ext"
5051
phpize
5152
./configure "$@"

5.6/fpm/docker-php-ext-install

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,19 @@ if [ "$pm" = 'apk' ]; then
8989
fi
9090
fi
9191

92+
popDir="$PWD"
9293
for ext in $exts; do
93-
(
94-
cd "$ext"
95-
[ -e Makefile ] || docker-php-ext-configure "$ext"
96-
make -j"$j"
97-
make -j"$j" install
98-
find modules \
99-
-maxdepth 1 \
100-
-name '*.so' \
101-
-exec basename '{}' ';' \
102-
| xargs -r docker-php-ext-enable
103-
make -j"$j" clean
104-
)
94+
cd "$ext"
95+
[ -e Makefile ] || docker-php-ext-configure "$ext"
96+
make -j"$j"
97+
make -j"$j" install
98+
find modules \
99+
-maxdepth 1 \
100+
-name '*.so' \
101+
-exec basename '{}' ';' \
102+
| xargs -r docker-php-ext-enable
103+
make -j"$j" clean
104+
cd "$popDir"
105105
done
106106

107107
if [ "$pm" = 'apk' ] && [ -n "$apkDel" ]; then

0 commit comments

Comments
 (0)