aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/setlocalversion
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2010-07-15 04:36:37 -0400
committerMichal Marek <mmarek@suse.cz>2010-07-21 10:06:05 -0400
commitb003afe32f608b8d9f9a898b36514dfbf374fd3a (patch)
tree1a2da53522eeecafc843a37ffd4ff5663e61a46e /scripts/setlocalversion
parent6dc0c2f3384fe543a805922c6a314c7ad25a92fc (diff)
kbuild: Fix make rpm
make rpm was broken by commit 0915512: make clean set -e; cd ..; ln -sf /usr/src/iwlwifi-2.6 kernel-2.6.35rc4wl /bin/sh /usr/src/iwlwifi-2.6/scripts/setlocalversion --scm-only > /usr/src/iwlwifi-2.6/.scmversion cat: .scmversion: input file is output file make[1]: *** [rpm] Error 1 Reported-and-tested-by: "Zheng, Jiajia" <jiajia.zheng@intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/setlocalversion')
-rwxr-xr-xscripts/setlocalversion9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index a7b9f7607e13..64a9cb5556cd 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -10,13 +10,13 @@
10# 10#
11 11
12usage() { 12usage() {
13 echo "Usage: $0 [--scm-only] [srctree]" >&2 13 echo "Usage: $0 [--save-scmversion] [srctree]" >&2
14 exit 1 14 exit 1
15} 15}
16 16
17scm_only=false 17scm_only=false
18srctree=. 18srctree=.
19if test "$1" = "--scm-only"; then 19if test "$1" = "--save-scmversion"; then
20 scm_only=true 20 scm_only=true
21 shift 21 shift
22fi 22fi
@@ -132,7 +132,10 @@ collect_files()
132} 132}
133 133
134if $scm_only; then 134if $scm_only; then
135 scm_version 135 if test ! -e .scmversion; then
136 res=$(scm_version)
137 echo "$res" >.scmversion
138 fi
136 exit 139 exit
137fi 140fi
138 141