remove move on /
This commit is contained in:
parent
4e04fc84b2
commit
c4b029f78d
|
@ -1,16 +1,4 @@
|
|||
#!/bin/bash
|
||||
dir=$(pwd)
|
||||
declare -a keep=("dist" "package.json" "yarn.lock" "client" "builder" "build" "pm2.config.js" "docker_run.sh")
|
||||
for moveDir in "${keep[@]}"
|
||||
do
|
||||
mv $moveDir / 2>/dev/null
|
||||
done
|
||||
cd /
|
||||
rm -r $dir
|
||||
mkdir $dir
|
||||
for keepDir in "${keep[@]}"
|
||||
do
|
||||
mv /$keepDir $dir/ 2>/dev/null
|
||||
done
|
||||
cd $dir
|
||||
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
|
||||
NODE_ENV=production yarn
|
||||
|
|
Loading…
Reference in New Issue