Skip to content

Commit

Permalink
Useless cat, consider using grep -c instead of grep|wc, adding double…
Browse files Browse the repository at this point in the history
… quote to prevent globbing and word splitting, and update PHP version 7.2.2
  • Loading branch information
sptndc committed Feb 4, 2018
1 parent 309926e commit 27890f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
cd "$(dirname "$0")"

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

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

CONFIGURE_STRING="--prefix=/usr/local/php7 \
Expand Down Expand Up @@ -74,7 +74,7 @@ CONFIGURE_STRING="--prefix=/usr/local/php7 \
--with-fpm-user=www-data \
--with-fpm-group=www-data"

./configure $CONFIGURE_STRING
./configure "$CONFIGURE_STRING"

make -j $JOB_COUNT
make -j "$JOB_COUNT"
sudo make install

0 comments on commit 27890f6

Please sign in to comment.