From e1c55a2da72e2d3a0a059cc4f8affac0f48dc836 Mon Sep 17 00:00:00 2001 From: tomamplius Date: Sun, 9 Oct 2022 09:35:21 +0200 Subject: [PATCH] remove move on / --- scripts/cleanup.sh | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/scripts/cleanup.sh b/scripts/cleanup.sh index 94a3d7e2be..adfc3408dc 100644 --- a/scripts/cleanup.sh +++ b/scripts/cleanup.sh @@ -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