scripts/kernel-functions: Fix download_and_extract_kernel_tree()

Use grep to check whether or not 'git tag' succeeded since the exit status
of 'git tag' is always zero.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8395 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2019-05-30 02:46:35 +00:00
parent 4cce3cad73
commit 163e34b548
+9 -2
View File
@@ -437,8 +437,15 @@ function download_and_extract_kernel_tree {
mkdir "linux-$1"
(
cd "${kernel_tree}" &&
{ git tag -l "v$1" >/dev/null ||
{ git fetch; git fetch stable; }; } &&
{
{ git tag -l "v$1" | grep -q '^v'; } ||
{
echo "Could not find tag v$1;" \
"updating git repository" 1>&2
git fetch origin
git fetch stable
}
} &&
git archive "v$1"
) | tar -C "linux-$1" -xf-
else