[ltsi-kernel,1/2] generate_git: Fix check for existence of series file
diff mbox

Message ID 1503483022-6452-1-git-send-email-geert+renesas@glider.be
State New
Headers show

Commit Message

Geert Uytterhoeven Aug. 23, 2017, 10:10 a.m. UTC
$SERIES always contains at least the string "/series", so the check for
a zero-length string never triggers.

To fix this, check for the existence of the file instead.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 scripts/generate_git | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Greg KH Sept. 5, 2017, 7:30 a.m. UTC | #1
On Wed, Aug 23, 2017 at 12:10:21PM +0200, Geert Uytterhoeven wrote:
> $SERIES always contains at least the string "/series", so the check for
> a zero-length string never triggers.
> 
> To fix this, check for the existence of the file instead.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  scripts/generate_git | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Thanks for both of these, now applied.

greg k-h

Patch
diff mbox

diff --git a/scripts/generate_git b/scripts/generate_git
index 1eb4462bca67f0cb..248939a5af437257 100755
--- a/scripts/generate_git
+++ b/scripts/generate_git
@@ -26,7 +26,7 @@  fi
 DIR=`dirname $0 |sed 's/scripts$//'`
 SERIES=$DIR/series
 
-if [ -z "$SERIES" ]; then
+if [ ! -f "$SERIES" ]; then
 	echo Cant find series file at $SERIES
 	exit 1
 fi