diff options
| author | NeilBrown <neilb@suse.de> | 2010-08-10 10:02:33 +1000 |
|---|---|---|
| committer | NeilBrown <neilb@suse.de> | 2010-08-10 10:02:33 +1000 |
| commit | fd8aa2c1811bf60ccb2d5de0579c6f62aec1772d (patch) | |
| tree | 311567d03758afc3a93b4273fe172836e89bb01d /scripts/setlocalversion | |
| parent | 6e17b0276452912cb13445e5ea552b599984675f (diff) | |
| parent | 2144381da478cc4aa3a29ee29b0c5e6ddaaced14 (diff) | |
| download | cachepc-linux-fd8aa2c1811bf60ccb2d5de0579c6f62aec1772d.tar.gz cachepc-linux-fd8aa2c1811bf60ccb2d5de0579c6f62aec1772d.zip | |
Merge git://git.infradead.org/users/dwmw2/libraid-2.6 into for-linus
Diffstat (limited to 'scripts/setlocalversion')
| -rwxr-xr-x | scripts/setlocalversion | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/scripts/setlocalversion b/scripts/setlocalversion index d6a866ed1835..64a9cb5556cd 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 |
