Skip to content

Commit 27890f6

Browse files
committed
Useless cat, consider using grep -c instead of grep|wc, adding double quote to prevent globbing and word splitting, and update PHP version 7.2.2
1 parent 309926e commit 27890f6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
cd "$(dirname "$0")"
33

44
# Use all cores for the build process
5-
CORE_COUNT=$(cat /proc/cpuinfo | grep processor | wc -l)
5+
CORE_COUNT=$(< /proc/cpuinfo | grep -c processor -l)
66

77
# Allow JOB_COUNT environment variable to override the job count
88
JOB_COUNT=${JOB_COUNT:-$CORE_COUNT}
@@ -32,7 +32,7 @@ sudo mkdir /usr/local/php7
3232
git clone https://github.com/php/php-src.git
3333
cd php-src
3434
git fetch --tags --prune
35-
git checkout tags/php-7.2.1
35+
git checkout tags/php-7.2.2
3636
./buildconf --force
3737

3838
CONFIGURE_STRING="--prefix=/usr/local/php7 \
@@ -74,7 +74,7 @@ CONFIGURE_STRING="--prefix=/usr/local/php7 \
7474
--with-fpm-user=www-data \
7575
--with-fpm-group=www-data"
7676

77-
./configure $CONFIGURE_STRING
77+
./configure "$CONFIGURE_STRING"
7878

79-
make -j $JOB_COUNT
79+
make -j "$JOB_COUNT"
8080
sudo make install

0 commit comments

Comments
 (0)