【发布时间】:2019-07-12 01:07:21
【问题描述】:
我希望从这样的 bash 脚本调用配置命令(编译 nginx):
CONF_OPTS=' --with-cc-opt="-O2 -g"'
./configure ${CONF_OPTS}
但我收到以下错误:
./configure: error: invalid option "-g"
当我通过以下选项时:
./configure --with-cc-opt="-O2 -g"
我没有错误。
复制:
curl -O http://nginx.org/download/nginx-1.14.2.tar.gz
tar xfz nginx-1.14.2.tar.gz
cd nginx-1.14.2
OPTS='--with-cc-opt="-O2 -g"'
./configure ${OPTS}
结果
./configure: error: invalid option "-g""
但是:
./configure --with-cc-opt="-O2 -g"
没关系
我认为这与 nginx 无关,但我认为这是 bash 引用替换问题。
【问题讨论】:
标签: bash nginx autotools configure