Skip to content

Commit

Permalink
nvidia_linux-4.8_rc2: Support packages without extra version
Browse files Browse the repository at this point in the history
Currently, Using a Linux release without an extra version, a dash is
added to the directory name, breaking the script `/sbin/nvidiactl`. Fix
it by composing the correct name with the *e* placeholder.

Note, this requires at least bee 1.2.11, so that the format placeholder
*d* is present in `beeversion`.
  • Loading branch information
pmenzel committed Aug 19, 2016
1 parent d50a8c8 commit 5aef24c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ PATCHURL+=('/src/mariux/patches/0003-kernel-Adapt-source-for-Linux-4.8.patch')

LINUXPKG=${PKGEXTRANAME}.${ARCH}

LINUXKLOCALVER=$(beeversion --format "%V.mx64.%r" "${LINUXPKG}")
LINUXKLOCALVER=$(beeversion --format "%v%d.mx64.%r" "${LINUXPKG}")

# '4.4.mx64.75' to '4.4.0.mx64.75'
# '4.8_rc2.mx64.95' to '4.8.0-rc2.mx64.95'
if [[ $LINUXKLOCALVER =~ ^([0-9]+\.[0-9]+)_?(.*)(\.mx64.*) ]]; then
LINUXKLOCALVER="${BASH_REMATCH[1]}.0-${BASH_REMATCH[2]}${BASH_REMATCH[3]}"
# '4.8-rc2.mx64.95' to '4.8.0-rc2.mx64.95'
if [[ $LINUXKLOCALVER =~ ^([0-9]+\.[0-9]+)(-?.*)(\.mx64.*) ]]; then
LINUXKLOCALVER="${BASH_REMATCH[1]}.0${BASH_REMATCH[2]}${BASH_REMATCH[3]}"
fi


Expand Down

0 comments on commit 5aef24c

Please sign in to comment.