mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine package for raspberry.
This commit is contained in:
parent
3a61620844
commit
be8aa92ab0
4 changed files with 57 additions and 3 deletions
|
@ -1,7 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "通用打包脚本,--help查看参数"
|
||||
|
||||
# Usage:
|
||||
# bash package.sh [arm]
|
||||
# bash package.sh [--help]
|
||||
# option arm, whether build for arm, requires ubuntu12.
|
||||
|
||||
# user can config the following configs, then package.
|
||||
|
@ -69,10 +71,17 @@ ret=$?; if [[ $ret -ne 0 ]]; then exit $ret; fi
|
|||
os_name=`lsb_release --id|awk '{print $3}'` &&
|
||||
os_release=`lsb_release --release|awk '{print $2}'` &&
|
||||
os_major_version=`echo $os_release|awk -F '.' '{print $1}'` &&
|
||||
os_machine=`uname -i`; if [[ "unknown" == $os_machine ]]; then os_machine=`uname -m`; fi
|
||||
os_machine=`uname -i`
|
||||
ret=$?; if [[ $ret -ne 0 ]]; then failed_msg "lsb_release get os info failed."; exit $ret; fi
|
||||
ok_msg "target os is ${os_name}-${os_major_version} ${os_release} ${os_machine}"
|
||||
|
||||
# for raspberry-pi
|
||||
# use rasberry-pi instead all release
|
||||
uname -a|grep "raspberrypi"; if [[ 0 -eq $? ]]; then os_name="RaspberryPi"; fi
|
||||
if [[ "Raspbian" == $os_name ]]; then os_name="RaspberryPi"; fi
|
||||
# check the cpu machine
|
||||
if [[ "unknown" == $os_machine ]]; then os_machine=`uname -m`; fi
|
||||
|
||||
# build srs
|
||||
# @see https://github.com/winlinvip/simple-rtmp-server/wiki/Build
|
||||
if [ $DO_BUILD = YES ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue