1 Star 0 Fork 5

greatitman / libav

forked from 上海老李 / libav 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
version.sh 678 Bytes
一键复制 编辑 原始数据 按行查看 历史
Michael Jerris 提交于 2015-05-15 21:37 . Initial commit
#!/bin/sh
# check for git short hash
revision=$(cd "$1" && git describe --always 2> /dev/null)
# no revision number found
test "$revision" || revision=$(cd "$1" && cat RELEASE 2> /dev/null)
# releases extract the version number from the VERSION file
version=$(cd "$1" && cat VERSION 2> /dev/null)
test "$version" || version=$revision
test -n "$3" && version=$version-$3
if [ -z "$2" ]; then
echo "$version"
exit
fi
NEW_REVISION="#define LIBAV_VERSION \"$version\""
OLD_REVISION=$(cat version.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" > "$2"
fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/greatitman/libav.git
git@gitee.com:greatitman/libav.git
greatitman
libav
libav
master

搜索帮助