From a54aa8afc4a476aaa8c51316c234767f2f2f401b Mon Sep 17 00:00:00 2001 From: dimti Date: Sun, 10 Jul 2022 14:11:22 +0300 Subject: [PATCH] * separate command in nerest quick to set executable bit on quick script *.sh files & check quick_dir exists before launch nerest script operations --- wp/nerest-quick.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/wp/nerest-quick.sh b/wp/nerest-quick.sh index 9e65a1e..8859ee5 100755 --- a/wp/nerest-quick.sh +++ b/wp/nerest-quick.sh @@ -1,5 +1,13 @@ #!/bin/bash QUICK_DIR=quick -cd $QUICK_DIR && -find ./ -name "*.sh.example" -exec sh -c 'F={}; cp -u $F ${F%.example} && chmod +x ${F%.example}' \; +if [[ ! -d $QUICK_DIR ]]; then + echo "Quick dir not exists: ${QUICK_DIR}" + exit 1 +fi + +cd $QUICK_DIR + +find ./ -name "*.sh.example" -exec sh -c 'F={}; cp -u $F ${F%.example}' \; + +find ./ -name "*.sh" -exec sh -c 'F={}; chmod +x ${F}' \;