From 46353b48e883dcdc6f96bbbf1f3588e45bcf9094 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sat, 4 May 2019 20:57:27 +0800 Subject: [PATCH] Use `egrep` instead of `find -regex`: ``` --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -38,7 +38,7 @@ jobs: name: "Gzip css/js/images" working_directory: /root/project/ command: | - for TARGET in `find ./public/ -type f -regextype posix-egrep -regex ".*\.(css|js|png|jpg|JPG|PNG|CSS|JS)"` + for TARGET in `find public/ -type f | egrep "\.(css|js|png|jpg|JPG|PNG|CSS|JS)$"` do gzip -c ${TARGET} > ${TARGET}.gz done ``` --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2ffcc84..39bd367 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -38,7 +38,7 @@ jobs: name: "Gzip css/js/images" working_directory: /root/project/ command: | - for TARGET in `find ./public/ -type f -regextype posix-egrep -regex ".*\.(css|js|png|jpg|JPG|PNG|CSS|JS)"` + for TARGET in `find public/ -type f | egrep "\.(css|js|png|jpg|JPG|PNG|CSS|JS)$"` do gzip -c ${TARGET} > ${TARGET}.gz done