ln -s /var/log/$SERVICE_NAME $RPM_INSTALL_PREFIX/logs || :
在 rpm spec 文件中,每一行都以 || 结尾:
有什么意义|| :
为什么它在那里?
最佳答案
它会导致忽略任何错误,从而不会取消 rpm 操作。
如果上一个命令失败,||
会导致下一个命令运行,并且 :
总是成功。
关于bash - || 是什么意思: in this line of bash script from an rpm spec file do?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5737978/