use egrep to replace grep + awk
This commit is contained in:
parent
c4b029f78d
commit
bc8331ddd4
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
KEEP="dist package.json yarn.lock client builder build pm2.config.js docker_run.sh"
|
KEEP="dist|package.json|yarn.lock|client|builder|build|pm2.config.js|docker_run.sh"
|
||||||
ls | grep -v $(echo ${KEEP} | awk '{split($0,a," ");for (i in a) printf "-e ^"a[i]"$ "}') | xargs rm -fr
|
echo "Removing unneeded build files:"
|
||||||
|
ls | egrep -v $KEEP | xargs rm -rf
|
||||||
NODE_ENV=production yarn
|
NODE_ENV=production yarn
|
||||||
|
|
Loading…
Reference in New Issue