1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Script: Discover version from code.

This commit is contained in:
winlin 2022-12-28 14:20:18 +08:00
parent 8a0ac8e3a1
commit 87a2ef100a
6 changed files with 42 additions and 5 deletions

View file

@ -320,7 +320,7 @@ echo ""
# Use srs-cache from base image. See https://github.com/ossrs/dev-docker/blob/ubuntu20-cache/Dockerfile
# Note that the cache for cygwin is not under /usr/local, but copy to objs instead.
if [[ -d /usr/local/srs-cache/srs/trunk/objs && $(pwd) != "/usr/local/srs-cache/srs/trunk" ]]; then
SOURCE_DIR=$(ls -d /usr/local/srs-cache/srs/trunk/objs/Platform-* 2>/dev/null|head -n 1)
SOURCE_DIR=$(ls -d /usr/local/srs-cache/srs/trunk/objs/Platform-SRS${SRS_MAJOR}-* 2>/dev/null|head -n 1)
if [[ -d $SOURCE_DIR ]]; then
TARGET_DIR=${SRS_OBJS}/${SRS_PLATFORM} &&
echo "Build from cache, source=$SOURCE_DIR, target=$TARGET_DIR" &&