Signed-off-by: Hu XueJiao 1034502035@qq.com --- sbin/set-env.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/sbin/set-env.sh b/sbin/set-env.sh index 0b197afc..27471bb5 100644 --- a/sbin/set-env.sh +++ b/sbin/set-env.sh @@ -6,10 +6,10 @@ write_shell_profile() { shell_profile_file=$(shell_profile) if [ $# -gt 0 ]; then - echo $@ >> $shell_profile_file + echo $@ >> $shell_profile_file else - echo "export LKP_SRC=$PWD" >> $shell_profile_file - echo "export PATH=$PATH:$LKP_SRC/sbin:$LKP_SRC/bin" >> $shell_profile_file + echo "export LKP_SRC=$PWD" >> $shell_profile_file + echo "export PATH=$PATH:$LKP_SRC/sbin:$LKP_SRC/bin" >> $shell_profile_file fi
source $shell_profile_file @@ -18,11 +18,11 @@ write_shell_profile() write_host() { if is_system "Linux"; then - nr_cpu=$(nproc) - memory_total=$(cat /proc/meminfo |grep MemTotal | awk '{print $2}') + nr_cpu=$(nproc) + memory_total=$(cat /proc/meminfo |grep MemTotal | awk '{print $2}') else - nr_cpu=$(sysctl -n hw.logicalcpu) - memory_total=$(top -l 1 | grep MemRegions | awk '{print $2}') + nr_cpu=$(sysctl -n hw.logicalcpu) + memory_total=$(top -l 1 | grep MemRegions | awk '{print $2}') fi memory_new=$(awk 'BEGIN{printf "%0.2f", '$memory_total'/1024/1024}') memory=$(echo $memory_new | awk '{print int($0)+1}')G