Message ID | 20171120092059.25478-1-vaibhav@linux.vnet.ibm.com |
---|---|
State | Accepted |
Headers | show |
Series | make_version: Fix check for '.version' file | expand |
Vaibhav Jain <vaibhav@linux.vnet.ibm.com> writes: > When building from the non-git tree and with '.version' file missing, > make_version shows this bash error message. > > % make > ... > cat: .version: No such file or directory > ... > error You need to set SKIBOOT_VERSION environment variable > > This patch fixes this issue by updating '.version' file check in > make_version script to test if it exists as a regular file and is > of non-zero size. > > Fixes: 6a3cad272e4c("Add fallback to .version if not git and no SKIBOOT_VERSION") > Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com> > --- > make_version.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks, merged to master as of 646dbfbec2870f81297e6a01da3f47712068364a
diff --git a/make_version.sh b/make_version.sh index 15aed6be..c757e914 100755 --- a/make_version.sh +++ b/make_version.sh @@ -50,7 +50,7 @@ else then echo $SKIBOOT_VERSION else - if [ ! -z "`cat .version`" ]; + if [ -f ".version" -a -s ".version" ]; then cat .version else
When building from the non-git tree and with '.version' file missing, make_version shows this bash error message. % make ... cat: .version: No such file or directory ... error You need to set SKIBOOT_VERSION environment variable This patch fixes this issue by updating '.version' file check in make_version script to test if it exists as a regular file and is of non-zero size. Fixes: 6a3cad272e4c("Add fallback to .version if not git and no SKIBOOT_VERSION") Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com> --- make_version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)