mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
update package for pi, check the lsb_release.
This commit is contained in:
parent
1d939f55ba
commit
024611cc08
1 changed files with 16 additions and 4 deletions
|
@ -79,6 +79,15 @@ package_dir=${build_objs}/package
|
||||||
log="${build_objs}/logs/package.`date +%s`.log" && . ${product_dir}/scripts/_log.sh && check_log
|
log="${build_objs}/logs/package.`date +%s`.log" && . ${product_dir}/scripts/_log.sh && check_log
|
||||||
ret=$?; if [[ $ret -ne 0 ]]; then exit $ret; fi
|
ret=$?; if [[ $ret -ne 0 ]]; then exit $ret; fi
|
||||||
|
|
||||||
|
# check lsb_release
|
||||||
|
lsb_release -a >/dev/null 2>&1
|
||||||
|
ret=$?; if [[ $ret -ne 0 ]]; then
|
||||||
|
failed_msg "lsb_release not found. to install on centos/debian(ubuntu/respberry-pi):";
|
||||||
|
failed_msg " sudo yum install -y lsb-release";
|
||||||
|
failed_msg " sudo aptitude install -y lsb-release";
|
||||||
|
exit $ret;
|
||||||
|
fi
|
||||||
|
|
||||||
# check os version
|
# check os version
|
||||||
os_name=`lsb_release --id|awk '{print $3}'` &&
|
os_name=`lsb_release --id|awk '{print $3}'` &&
|
||||||
os_release=`lsb_release --release|awk '{print $2}'` &&
|
os_release=`lsb_release --release|awk '{print $2}'` &&
|
||||||
|
@ -89,10 +98,13 @@ ok_msg "target os is ${os_name}-${os_major_version} ${os_release} ${os_machine}"
|
||||||
|
|
||||||
# for raspberry-pi
|
# for raspberry-pi
|
||||||
# use rasberry-pi instead all release
|
# use rasberry-pi instead all release
|
||||||
uname -a|grep "raspberrypi"; if [[ 0 -eq $? ]]; then os_name="RaspberryPi"; fi
|
if [ $PI = YES ]; then
|
||||||
if [[ "Raspbian" == $os_name ]]; then os_name="RaspberryPi"; fi
|
uname -a|grep "raspberrypi"; if [[ 0 -eq $? ]]; then os_name="RaspberryPi"; fi
|
||||||
# check the cpu machine
|
if [[ "Raspbian" == $os_name ]]; then os_name="RaspberryPi"; fi
|
||||||
if [[ "unknown" == $os_machine ]]; then os_machine=`uname -m`; fi
|
# check the cpu machine
|
||||||
|
if [[ "unknown" == $os_machine ]]; then os_machine=`uname -m`; fi
|
||||||
|
fi
|
||||||
|
ok_msg "real os is ${os_name}-${os_major_version} ${os_release} ${os_machine}"
|
||||||
|
|
||||||
# build srs
|
# build srs
|
||||||
# @see https://github.com/winlinvip/simple-rtmp-server/wiki/Build
|
# @see https://github.com/winlinvip/simple-rtmp-server/wiki/Build
|
||||||
|
|
Loading…
Reference in a new issue