提交 6ac049d6 authored 作者: Josh Bleecher Snyder's avatar Josh Bleecher Snyder

Make hook more portable (expr didn't support substr on OS X)

上级 bce68b03
...@@ -5,6 +5,6 @@ if [ -z "$HG_NODE" ] ; then ...@@ -5,6 +5,6 @@ if [ -z "$HG_NODE" ] ; then
echo No HG_NODE, skipping update of theano.__version__ echo No HG_NODE, skipping update of theano.__version__
exit 0 # this seems to be normal sometimes exit 0 # this seems to be normal sometimes
else else
sed -e "s/^hg_revision.*/hg_revision = '`expr substr $HG_NODE 1 12`'/" theano/version.py >theano/version.py.out && mv theano/version.py.out theano/version.py sed -e "s/^hg_revision.*/hg_revision = '`python -c \"print \\"$HG_NODE\\"[0:12]\"`'/" theano/version.py >theano/version.py.out && mv theano/version.py.out theano/version.py
fi fi
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论