Skip to content

Commit c201fad

Browse files
committed
get version from tag
1 parent 6a1eb06 commit c201fad

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

suitesparse.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
#!/bin/bash
22

33
# parse SuiteSparse version from first argument, a git tag that ends in the version (no leading v)
4-
#if [[ $1 =~ refs/tags/([0-9]*\.[0-9]*\.[0-9]*)\..*$ ]];
5-
#then
6-
# VERSION=${BASH_REMATCH[1]}
7-
#else
8-
# echo "Specify a SuiteSparse version, such as: $0 refs/tags/7.4.3.0"
9-
# exit -1
10-
#fi
11-
VERSION=7.4.3
4+
if [[ $1 =~ refs/tags/([0-9]*\.[0-9]*\.[0-9]*)\..*$ ]];
5+
then
6+
VERSION=${BASH_REMATCH[1]}
7+
else
8+
echo "Specify a SuiteSparse version, such as: $0 refs/tags/7.4.3.0"
9+
exit -1
10+
fi
1211
echo VERSION: $VERSION
1312

1413
NPROC="$(nproc)"

0 commit comments

Comments
 (0)