Use `xargs`, instead of `for`.
This commit is contained in:
parent
3478c90104
commit
30310d143a
|
@ -17,8 +17,8 @@ steps:
|
|||
- name: Compress-the-Assets
|
||||
image: alpine:3.9
|
||||
commands:
|
||||
- for TARGET in `find public/ -type f | egrep "\.(css|js|png|jpg|JPG|PNG|CSS|JS)$"`; do gzip -c ${TARGET} > ${TARGET}.gz; done
|
||||
- for TARGET in `find public/ -type f | egrep "\.(html|HTML)$"`; do gzip -c ${TARGET} > ${TARGET}.gz; done
|
||||
- find public/ -type f | egrep "\.(css|js|png|jpg|JPG|PNG|CSS|JS)$" | xargs -n 1 -i% -P 0 -t sh -c 'cp % %.bk && gzip % && mv %.bk %'
|
||||
- find public/ -type f | egrep "\.(html|HTML)$" | xargs -n 1 -i% -P 0 -t sh -c 'cp % %.bk && gzip % && mv %.bk %'
|
||||
|
||||
- name: housekeep
|
||||
image: appleboy/drone-ssh
|
||||
|
@ -71,8 +71,8 @@ steps:
|
|||
- name: Compress-the-Assets
|
||||
image: alpine:3.9
|
||||
commands:
|
||||
- for TARGET in `find public/ -type f | egrep "\.(css|js|png|jpg|JPG|PNG|CSS|JS)$"`; do gzip -c ${TARGET} > ${TARGET}.gz; done
|
||||
- for TARGET in `find public/ -type f | egrep "\.(html|HTML)$"`; do gzip -c ${TARGET} > ${TARGET}.gz; done
|
||||
- find public/ -type f | egrep "\.(css|js|png|jpg|JPG|PNG|CSS|JS)$" | xargs -n 1 -i% -P 0 -t sh -c 'cp % %.bk && gzip % && mv %.bk %'
|
||||
- find public/ -type f | egrep "\.(html|HTML)$" | xargs -n 1 -i% -P 0 -t sh -c 'cp % %.bk && gzip % && mv %.bk %'
|
||||
|
||||
- name: housekeep
|
||||
image: appleboy/drone-ssh
|
||||
|
|
Loading…
Reference in New Issue