mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix the sed bug, to compatible with osx
This commit is contained in:
parent
a9ed44ccc7
commit
d72b93e58b
1 changed files with 17 additions and 1 deletions
18
trunk/auto/depends.sh
Normal file → Executable file
18
trunk/auto/depends.sh
Normal file → Executable file
|
@ -362,7 +362,23 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
|
|||
fi
|
||||
|
||||
# the sed command
|
||||
SED="sed -i" && if [ $OS_IS_OSX = YES ]; then SED="sed -i ''"; fi
|
||||
function sed_utility() {
|
||||
if [ $OS_IS_OSX = YES ]; then
|
||||
sed -i '' "$@"
|
||||
else
|
||||
sed -i "$@"
|
||||
fi
|
||||
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then
|
||||
if [ $OS_IS_OSX = YES ]; then
|
||||
echo "sed -i '' \"$@\""
|
||||
else
|
||||
echo "sed -i \"$@\""
|
||||
fi
|
||||
return $ret
|
||||
fi
|
||||
}
|
||||
SED="sed_utility" && echo "SED is $SED"
|
||||
|
||||
#####################################################################################
|
||||
# check the os.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue