1
0
Fork 0
mirror of synced 2024-06-02 10:34:40 +12:00

use egrep to replace grep + awk

This commit is contained in:
tomamplius 2022-10-21 21:09:03 +02:00 committed by GitHub
parent e1c55a2da7
commit 012a007116
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,5 @@
#!/bin/bash
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
KEEP="dist|package.json|yarn.lock|client|builder|build|pm2.config.js|docker_run.sh"
echo "Removing unneeded build files:"
ls | egrep -v $KEEP | xargs rm -rf
NODE_ENV=production yarn