您的位置:首页 > 财经 > 金融 > 个性化定制产品_公司简介宣传图_四年级小新闻50字左右_新品上市怎么推广词

个性化定制产品_公司简介宣传图_四年级小新闻50字左右_新品上市怎么推广词

2024/12/23 12:15:28 来源:https://blog.csdn.net/hao745580264_dawei/article/details/142879597  浏览:    关键词:个性化定制产品_公司简介宣传图_四年级小新闻50字左右_新品上市怎么推广词
个性化定制产品_公司简介宣传图_四年级小新闻50字左右_新品上市怎么推广词

安装工具

        通过linux yum源下载,可能因为yum源的问题找不到软件包,或者下载的软件包版本太旧。

 

ShellCheck的源代码托管在GitHub上(推荐下载方式):

GitHub - koalaman/shellcheck: ShellCheck, a static analysis tool for shell scripts

 

 

        对下载的可执行程序压缩包进行解压,将shellcheck可执行命令加入环境变量:拷贝至/bin/下,以方便在任何位置都可以通过tab键补齐shellcheck并使用。

使用shellcheck

#!/bin/bash  # 设置编译器和编译选项  
COMPILER=arm-linux-gnueabihf-g++ #CPP编译器
COMPILE_FLAGS_JSONCPP="-L /usr/local/lib /usr/local/lib/libjsoncpp.a"  #链接 jsoncp库
COMPILE_FLAGS_CGICC="-I /usr/local/cgicc-3.2.20/include -L /usr/local/cgicc-3.2.20/lib -lcgicc"  #链接 cgicc库
COMPILE_FLAGS_SQLITE3="-I /usr/local/sqlite3/include/ -L /usr/local/sqlite3/lib/ -lsqlite3"  #链接 sqlite3库
COMPILE_FLAGS_OPENSSL="-I /usr/local/arm-openssl-3.0/include/ -L /usr/local/arm-openssl-3.0/lib64/ -lcrypto"  #链接 crypto库UPHOLD_TOOLS=uphold_tools
cd $UPHOLD_TOOLS
$COMPILER -o $UPHOLD_TOOLS.cgi $UPHOLD_TOOLS.cpp $COMPILE_FLAGS_CGICC $COMPILE_FLAGS_JSONCPP $COMPILE_FLAGS_OPENSSL
if [ $? -ne 0 ]; thenecho "Error compiling $UPHOLD_TOOLS"exit 1  
fi
SYSTEM_REBOOT=system_reboot
$COMPILER -o $SYSTEM_REBOOT.cgi $SYSTEM_REBOOT.cpp $COMPILE_FLAGS_CGICC $COMPILE_FLAGS_JSONCPP
if [ $? -ne 0 ]; thenecho "Error compiling $SYSTEM_REBOOT"exit 1  
fi
cd ..
#拷贝.cgi和.sh到radio-gateway中
find $UPHOLD_TOOLS -type f \( -name "*.cgi" -o -name "*.sh" \) -exec cp {} ../radio-gateway/cgi-bin/$UPHOLD_TOOLS \;
if [ $? -ne 0 ]; then  echo "Error copy $UPHOLD_TOOLS"exit 1
fi#拷贝web源代码到radio-gateway中
cp -r ../web ../radio-gateway/
rm -rf ../radio-gateway/web/index.html
cp ../web/index.html ../radio-gateway/echo "Compilation and copy successful."

优化建议:

[root@localdomain home]# shellcheck compile.sh In compile.sh line 7:
COMPILE_FLAGS_SQLITE3="-I /usr/local/sqlite3/include/ -L /usr/local/sqlite3/lib/ -lsqlite3"  #链接 sqlite3库
^-------------------^ SC2034 (warning): COMPILE_FLAGS_SQLITE3 appears unused. Verify use (or export if used externally).In compile.sh line 11:
cd $UPHOLD_TOOLS
^--------------^ SC2164 (warning): Use 'cd ... || exit' or 'cd ... || return' in case cd fails.Did you mean: 
cd $UPHOLD_TOOLS || exitIn compile.sh line 12:
$COMPILER -o $UPHOLD_TOOLS.cgi $UPHOLD_TOOLS.cpp $COMPILE_FLAGS_CGICC $COMPILE_FLAGS_JSONCPP $COMPILE_FLAGS_OPENSSL^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.Did you mean: 
$COMPILER -o $UPHOLD_TOOLS.cgi $UPHOLD_TOOLS.cpp "$COMPILE_FLAGS_CGICC" "$COMPILE_FLAGS_JSONCPP" "$COMPILE_FLAGS_OPENSSL"In compile.sh line 13:
if [ $? -ne 0 ]; then^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?.In compile.sh line 18:
$COMPILER -o $SYSTEM_REBOOT.cgi $SYSTEM_REBOOT.cpp $COMPILE_FLAGS_CGICC $COMPILE_FLAGS_JSONCPP^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting.Did you mean: 
$COMPILER -o $SYSTEM_REBOOT.cgi $SYSTEM_REBOOT.cpp "$COMPILE_FLAGS_CGICC" "$COMPILE_FLAGS_JSONCPP"In compile.sh line 19:
if [ $? -ne 0 ]; then^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?.In compile.sh line 23:
cd ..
^---^ SC2103 (info): Use a ( subshell ) to avoid having to cd back.In compile.sh line 26:
if [ $? -ne 0 ]; then  ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?.For more information:https://www.shellcheck.net/wiki/SC2034 -- COMPILE_FLAGS_SQLITE3 appears unu...https://www.shellcheck.net/wiki/SC2164 -- Use 'cd ... || exit' or 'cd ... |...https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
[root@localdomain home]# 

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com