summaryrefslogtreecommitdiff
path: root/scripts/setlocalversion
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2010-08-06 14:37:02 (GMT)
committerChris Metcalf <cmetcalf@tilera.com>2010-08-06 14:37:02 (GMT)
commitab11b487402f97975f3ac1eeea09c82f4431481e (patch)
tree86337c5cbbd2b0c4bd07c0847a1dc7de3d898147 /scripts/setlocalversion
parent1c689cbcf2c2b7a35cd237abddd9206bb1b6fee1 (diff)
parentfc1caf6eafb30ea185720e29f7f5eccca61ecd60 (diff)
downloadlinux-ab11b487402f97975f3ac1eeea09c82f4431481e.tar.xz
Merge branch 'master' into for-linus
Diffstat (limited to 'scripts/setlocalversion')
-rwxr-xr-xscripts/setlocalversion16
1 files changed, 10 insertions, 6 deletions
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index d6a866e..64a9cb5 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -10,13 +10,13 @@
#
usage() {
- echo "Usage: $0 [--scm-only] [srctree]" >&2
+ echo "Usage: $0 [--save-scmversion] [srctree]" >&2
exit 1
}
scm_only=false
srctree=.
-if test "$1" = "--scm-only"; then
+if test "$1" = "--save-scmversion"; then
scm_only=true
shift
fi
@@ -30,11 +30,12 @@ fi
scm_version()
{
- local short=false
+ local short
+ short=false
cd "$srctree"
if test -e .scmversion; then
- cat "$_"
+ cat .scmversion
return
fi
if test "$1" = "--short"; then
@@ -131,12 +132,15 @@ collect_files()
}
if $scm_only; then
- scm_version
+ if test ! -e .scmversion; then
+ res=$(scm_version)
+ echo "$res" >.scmversion
+ fi
exit
fi
if test -e include/config/auto.conf; then
- source "$_"
+ . include/config/auto.conf
else
echo "Error: kernelrelease not valid - run 'make prepare' to update it"
exit 1