正在显示
1 个修改的文件
包含
17 行增加
和
1 行删除
| @@ -362,7 +362,23 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | @@ -362,7 +362,23 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then | ||
| 362 | fi | 362 | fi |
| 363 | 363 | ||
| 364 | # the sed command | 364 | # the sed command |
| 365 | -SED="sed -i" && if [ $OS_IS_OSX = YES ]; then SED="sed -i ''"; fi | 365 | +function sed_utility() { |
| 366 | + if [ $OS_IS_OSX = YES ]; then | ||
| 367 | + sed -i '' "$@" | ||
| 368 | + else | ||
| 369 | + sed -i "$@" | ||
| 370 | + fi | ||
| 371 | + | ||
| 372 | + ret=$?; if [[ $ret -ne 0 ]]; then | ||
| 373 | + if [ $OS_IS_OSX = YES ]; then | ||
| 374 | + echo "sed -i '' \"$@\"" | ||
| 375 | + else | ||
| 376 | + echo "sed -i \"$@\"" | ||
| 377 | + fi | ||
| 378 | + return $ret | ||
| 379 | + fi | ||
| 380 | +} | ||
| 381 | +SED="sed_utility" && echo "SED is $SED" | ||
| 366 | 382 | ||
| 367 | ##################################################################################### | 383 | ##################################################################################### |
| 368 | # check the os. | 384 | # check the os. |
-
请 注册 或 登录 后发表评论