aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/setlocalversion
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/setlocalversion')
-rwxr-xr-xscripts/setlocalversion6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 00790472f641..46989b88d734 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -39,8 +39,10 @@ if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
39 printf -- '-svn%s' "`git svn find-rev $head`" 39 printf -- '-svn%s' "`git svn find-rev $head`"
40 fi 40 fi
41 41
42 # Are there uncommitted changes? 42 # Update index only on r/w media
43 git update-index --refresh --unmerged > /dev/null 43 [ -w . ] && git update-index --refresh --unmerged > /dev/null
44
45 # Check for uncommitted changes
44 if git diff-index --name-only HEAD | grep -v "^scripts/package" \ 46 if git diff-index --name-only HEAD | grep -v "^scripts/package" \
45 | read dummy; then 47 | read dummy; then
46 printf '%s' -dirty 48 printf '%s' -dirty