1 Star 0 Fork 4

guohuacai/smplayer-0.6.7

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
get_svn_revision.sh 887 Bytes
一键复制 编辑 原始数据 按行查看 历史
guohuacai 提交于 2020-11-23 17:42 . init
#!/bin/sh
# This file is taken from the MPlayer sources, and adapted a little bit.
# It gets the SVN revision number and then saves it in two files:
# src/svn_revision.h and svn_revision
test "$1" && extra="-$1"
svn_revision=`LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2`
test $svn_revision || svn_revision=`cd "$1" && grep revision .svn/entries 2>/dev/null | cut -d '"' -f2`
test $svn_revision || svn_revision=`cd "$1" && sed -n -e '/^dir$/{n;p;q}' .svn/entries 2>/dev/null`
test $svn_revision || svn_revision=0UNKNOWN
NEW_REVISION="#define SVN_REVISION \"SVN-r${svn_revision}${extra}\""
OLD_REVISION=`cat src/svn_revision.h 2> /dev/null`
# Update version.h only on revision changes to avoid spurious rebuilds
if test "$NEW_REVISION" != "$OLD_REVISION"; then
echo "$NEW_REVISION" > src/svn_revision.h
echo "SVN-r${svn_revision}${extra}" > svn_revision
fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/guohuacai/smplayer-0.6.7.git
git@gitee.com:guohuacai/smplayer-0.6.7.git
guohuacai
smplayer-0.6.7
smplayer-0.6.7
master

搜索帮助