]> granicus.if.org Git - graphviz/commitdiff
ci/build.sh: remove trailing text after actual version ID
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 7 Sep 2021 17:44:57 +0000 (19:44 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Wed, 8 Sep 2021 16:40:58 +0000 (18:40 +0200)
Fixes a problem on Cygwin where 'uname -r' gives:

3.2.0(0.340/5/3)

which, when used as the name of a directory, actually represents a
directory named '3.2.0(0.340', containing a subdirectory named '5'
containing a subdirectory named '3)'.

ci/build.sh

index 3c8e9eef854929cabeb1dd0fa55464bac988ac0e..93dacf05929479a939ac780bb238610af5ddb012 100755 (executable)
@@ -14,7 +14,8 @@ if [ -f /etc/os-release ]; then
     fi
 else
     ID=$( uname -s )
-    VERSION_ID=$( uname -r )
+    # remove trailing text after actual version
+    VERSION_ID=$( uname -r | sed "s/\([0-9\.]*\).*/\1/")
 fi
 COLLECTION=$( cat COLLECTION )
 META_DATA_DIR=Metadata/${COLLECTION}/${ID}/${VERSION_ID}