From 45385241bbafff6f705d351ca57707aaad2fedd9 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 26 Oct 2015 13:29:59 +0800 Subject: [PATCH 1/2] fix the sed command for arm --- trunk/auto/depends.sh | 2 +- trunk/auto/generate-srs-librtmp-single.sh | 4 ---- trunk/auto/setup_variables.sh | 4 ++++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/trunk/auto/depends.sh b/trunk/auto/depends.sh index 8974c3d33..3b5c74c50 100644 --- a/trunk/auto/depends.sh +++ b/trunk/auto/depends.sh @@ -513,7 +513,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 - $SED '' "s/^.user nobody;/user `whoami`;/g" ${SRS_OBJS}/nginx/conf/nginx.conf + $SED "s/^.user nobody;/user `whoami`;/g" ${SRS_OBJS}/nginx/conf/nginx.conf fi # the demo dir. diff --git a/trunk/auto/generate-srs-librtmp-single.sh b/trunk/auto/generate-srs-librtmp-single.sh index 390e438ca..191d33d0f 100755 --- a/trunk/auto/generate-srs-librtmp-single.sh +++ b/trunk/auto/generate-srs-librtmp-single.sh @@ -7,10 +7,6 @@ ret=$?; if [[ 0 -eq $ret ]]; then 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 # diff --git a/trunk/auto/setup_variables.sh b/trunk/auto/setup_variables.sh index d1d643b4f..bb517aef1 100644 --- a/trunk/auto/setup_variables.sh +++ b/trunk/auto/setup_variables.sh @@ -28,3 +28,7 @@ if [[ -z $SrsArmCXX ]]; then SrsArmCXX=$__SrsArmCXX; fi if [[ -z $SrsArmAR ]]; then SrsArmAR=$__SrsArmAR; fi if [[ -z $SrsArmLD ]]; then SrsArmLD=$__SrsArmLD; fi if [[ -z $SrsArmRANDLIB ]]; then SrsArmRANDLIB=$__SrsArmRANDLIB; fi + +# the sed command +SED="sed -i" +if [ $OS_IS_OSX = YES ]; then SED="sed -i ''"; fi From e08beba89e99627775b51062a664ca42b725d804 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 26 Oct 2015 13:34:28 +0800 Subject: [PATCH 2/2] fix the sed command for arm --- trunk/auto/depends.sh | 3 +++ trunk/auto/setup_variables.sh | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/trunk/auto/depends.sh b/trunk/auto/depends.sh index 3b5c74c50..e3d9e5f94 100644 --- a/trunk/auto/depends.sh +++ b/trunk/auto/depends.sh @@ -361,6 +361,9 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then OSX_prepare; ret=$?; if [[ 0 -ne $ret ]]; then echo "OSX prepare failed, ret=$ret"; exit $ret; fi fi +# the sed command +SED="sed -i" && if [ $OS_IS_OSX = YES ]; then SED="sed -i ''"; fi + ##################################################################################### # check the os. ##################################################################################### diff --git a/trunk/auto/setup_variables.sh b/trunk/auto/setup_variables.sh index bb517aef1..d1d643b4f 100644 --- a/trunk/auto/setup_variables.sh +++ b/trunk/auto/setup_variables.sh @@ -28,7 +28,3 @@ if [[ -z $SrsArmCXX ]]; then SrsArmCXX=$__SrsArmCXX; fi if [[ -z $SrsArmAR ]]; then SrsArmAR=$__SrsArmAR; fi if [[ -z $SrsArmLD ]]; then SrsArmLD=$__SrsArmLD; fi if [[ -z $SrsArmRANDLIB ]]; then SrsArmRANDLIB=$__SrsArmRANDLIB; fi - -# the sed command -SED="sed -i" -if [ $OS_IS_OSX = YES ]; then SED="sed -i ''"; fi