浏览代码

Btrfs: Fix version.sh when used outside of an hg repo

Signed-off-by: Chris Mason <chris.mason@oracle.com>
Chris Mason 17 年之前
父节点
当前提交
1a3f5d0400
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      fs/btrfs/version.sh

+ 2 - 2
fs/btrfs/version.sh

@@ -6,10 +6,10 @@
 # Copyright 2008, Oracle
 # Released under the GNU GPLv2
  
-v="Btrfs v0.15"
+v="v0.15"
 
 which hg > /dev/null
-if [ $? == 0 ]; then
+if [ -d .hg ] && [ $? == 0 ]; then
 	last=$(hg tags | grep -m1 -o '^v[0-9.]\+')
 	 
 	# now check if the repo has commits since then...