From e2dbbc30f9e8a0918d717cc3aacc37fc10cde4d0 Mon Sep 17 00:00:00 2001 From: LIU Lei <33851080+Hydro3639@users.noreply.github.com> Date: Mon, 26 Dec 2022 17:55:41 +0100 Subject: [PATCH] check mes fix --- bin/nanophase.meta | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/nanophase.meta b/bin/nanophase.meta index 1b89995..4755a4c 100644 --- a/bin/nanophase.meta +++ b/bin/nanophase.meta @@ -187,10 +187,10 @@ fi if [[ ! -s $OutDIR/.package.not.installed ]]; then echo "All required packages have been found in the environment. If the above certain packages integrated into nanophase were used in your investigation, please give them credit as well :)" - path_check=`cat $OutDIR/.package.installed | awk '{printf "%-20s %s\n", $1,$2}' | awk '{print $2}' | while read path; do dirname $path; done | awk '!a[$1]++' | wc -l` + path_check=`cat $OutDIR/.package.installed | awk '{printf "%-20s %s\n", $1,$2}' | awk '{print $2}' | while read path; do dirname $path; done | awk '!a[$1]++' | wc -l` if [[ $path_check -gt 1 ]]; then env_name=`which nanophase | awk -F"/" '{print $(NF-2)}'` - not_in=`cat .package.installed | awk '{printf "%-20s %s\n", $1,$2}' | awk '{print $2}' | while read path; do dirname $path; done | grep -v "$env_name" | while read line; do grep -w $line .package.installed; done | awk '!a[$1]++ {print $1}' | tr '\n' ' ' | sed -e 's/ $//g'` + not_in=`cat $OutDIR/.package.installed | awk '{printf "%-20s %s\n", $1,$2}' | awk '{print $2}' | while read path; do dirname $path; done | grep -v "$env_name" | while read line; do grep -w $line .package.installed; done | awk '!a[$1]++ {print $1}' | tr '\n' ' ' | sed -e 's/ $//g'` echo -e "Warning: [$not_in] has not been installed in the [${env_name}] env. Strongly recommend intalling all packages in the [${env_name}] env, or it may result in a failure\n" rm -rf $OutDIR/.package.installed else