Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2015-05-24 14:52:37 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a45cf38d44f690cfb4a0fe36bc4ff98e131f97d4
a45cf38d
1 parent
f510a3d6
auto detect the sed command for osx.
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
14 行增加
和
7 行删除
trunk/auto/depends.sh
trunk/auto/generate-srs-librtmp-single.sh
trunk/auto/depends.sh
查看文件 @
a45cf38
...
...
@@ -504,11 +504,7 @@ if [ $__SRS_BUILD_NGINX = YES ]; then
# srs will write ts/m3u8 file use current user,
# nginx default use nobody, so cannot read the ts/m3u8 created by srs.
cp
${
SRS_OBJS
}
/nginx/conf/nginx.conf
${
SRS_OBJS
}
/nginx/conf/nginx.conf.bk
if
[
$OS_IS_OSX
=
YES
]
;
then
sed -i
''
"s/^.user nobody;/user
`
whoami
`
;/g"
${
SRS_OBJS
}
/nginx/conf/nginx.conf
else
sed -i
"s/^.user nobody;/user
`
whoami
`
;/g"
${
SRS_OBJS
}
/nginx/conf/nginx.conf
fi
$SED
''
"s/^.user nobody;/user
`
whoami
`
;/g"
${
SRS_OBJS
}
/nginx/conf/nginx.conf
fi
# the demo dir.
...
...
trunk/auto/generate-srs-librtmp-single.sh
查看文件 @
a45cf38
#!/bin/bash
OS_IS_OSX
=
NO
uname -s|grep Darwin >/dev/null 2>&1
ret
=
$?
;
if
[[
0 -eq
$ret
]]
;
then
OS_IS_OSX
=
YES
fi
echo
"Is OSX:
${
OS_IS_OSX
}
"
# the sed command
SED
=
"sed -i"
if
[
$OS_IS_OSX
=
YES
]
;
then
SED
=
"sed -i ''"
;
fi
# when export srs-librtmp single files
# package the whole project to srs_librtmp.h and srs_librtmp.cpp
#
...
...
@@ -59,7 +70,7 @@ function build_module_hpp()
for
item
in
${
SRS_LIBRTMP_OBJS
[*]
}
;
do
FILE_NAME
=
"
${
item
%.*
}
"
echo
"// following is generated by
${
FILE_NAME
}
.hpp"
>>
$FILE
&&
sed -i
"s|#include <srs_|//#include <srs_|g"
$SRS_EXPORT_LIBRTMP_SINGLE
/
${
FILE_NAME
}
.hpp
&&
$SED
"s|#include <srs_|//#include <srs_|g"
$SRS_EXPORT_LIBRTMP_SINGLE
/
${
FILE_NAME
}
.hpp
&&
cat
$SRS_EXPORT_LIBRTMP_SINGLE
/
${
FILE_NAME
}
.hpp >>
$FILE
ret
=
$?
;
if
[[
$ret
-ne 0
]]
;
then
echo
-e
"
${
RED
}
failed to generate the srs_librtmp.cpp by
${
FILE_NAME
}
.hpp. {
${
BLACK
}
"
...
...
@@ -78,7 +89,7 @@ function build_module_cpp()
for
item
in
${
SRS_LIBRTMP_OBJS
[*]
}
;
do
FILE_NAME
=
"
${
item
%.*
}
"
echo
"// following is generated by
${
FILE_NAME
}
.cpp"
>>
$FILE
&&
sed -i
"s|#include <srs_|//#include <srs_|g"
$SRS_EXPORT_LIBRTMP_SINGLE
/
${
FILE_NAME
}
.cpp
&&
$SED
"s|#include <srs_|//#include <srs_|g"
$SRS_EXPORT_LIBRTMP_SINGLE
/
${
FILE_NAME
}
.cpp
&&
cat
$SRS_EXPORT_LIBRTMP_SINGLE
/
${
FILE_NAME
}
.cpp >>
$FILE
ret
=
$?
;
if
[[
$ret
-ne 0
]]
;
then
echo
-e
"
${
RED
}
failed to generate the srs_librtmp.cpp by
${
FILE_NAME
}
.cpp. {
${
BLACK
}
"
...
...
请
注册
或
登录
后发表评论