Skip to content

Commit

Permalink
nvidia_linux-4.8_rc2: Put modules in correct directory
Browse files Browse the repository at this point in the history
Adapt the script to take the extra version into account, and put the
modules into the correct directory.

*   before: /usr/share/nvidia/kernel/4.8.0.mx64.95
*   after: /usr/share/nvidia/kernel/4.8.0-rc2.mx64.95

Here are some examples used for testing.

```
$ test=$(beeversion --format "%V.mx64.%r" linux-4.8_rc2-95.x86_64); if [[ $test =~ ^([0-9]+\.[0-9]+)_?(.*)(\.mx64.*) ]]; then echo "${BASH_REMATCH[1]}.0-${BASH_REMATCH[2]}${BASH_REMATCH[3]}"; fi
4.8.0-rc2.mx64.95
test=$(beeversion --format "%V.mx64.%r" linux-4.8-95.x86_64); if [[ $test =~ ^([0-9]+\.[0-9]+)_?(.*)(\.mx64.*) ]]; then echo "${BASH_REMATCH[1]}.0-${BASH_REMATCH[2]}${BASH_REMATCH[3]}"; fi
4.8.0-.mx64.95
$ test=$(beeversion --format "%V.mx64.%r" linux-4.8_rc2-95.x86_64); if [[ $test =~ ^([0-9]+\.[0-9]+)(_?.*)(\.mx64.*) ]]; then echo "${BASH_REMATCH[1]}.0${BASH_REMATCH[2]}${BASH_REMATCH[3]}"; fi
4.8.0_rc2.mx64.95
$ test=$(beeversion --format "%V.mx64.%r" linux-4.8-95.x86_64); if [[ $test =~ ^([0-9]+\.[0-9]+)(_?.*)(\.mx64.*) ]]; then echo "${BASH_REMATCH[1]}.0${BASH_REMATCH[2]}${BASH_REMATCH[3]}"; fi
4.8.0.mx64.95
```

As you can see, it currently doesn’t work, when the package has no extra
version.
  • Loading branch information
pmenzel committed Aug 19, 2016
1 parent a088e97 commit d50a8c8
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +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.mx64.%r" "${LINUXPKG}")

# '4.4.mx64.75' to '4.4.0.mx64.75'
if [[ $LINUXKLOCALVER =~ ^([0-9]+\.[0-9]+)(\.mx64.*) ]]; then
LINUXKLOCALVER="${BASH_REMATCH[1]}.0${BASH_REMATCH[2]}"
# '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 d50a8c8

Please sign in to comment.