From 5aef24ce0cfe5812b629c4ae9873a4878a3aef9f Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 19 Aug 2016 15:45:15 +0200 Subject: [PATCH] nvidia_linux-4.8_rc2: Support packages without extra version 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`. --- ...5-367.18-1.bee => nvidia_linux-4.8_rc2-95-367.18-2.bee | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename nvidia_linux-4.8_rc2-95-367.18-1.bee => nvidia_linux-4.8_rc2-95-367.18-2.bee (91%) diff --git a/nvidia_linux-4.8_rc2-95-367.18-1.bee b/nvidia_linux-4.8_rc2-95-367.18-2.bee similarity index 91% rename from nvidia_linux-4.8_rc2-95-367.18-1.bee rename to nvidia_linux-4.8_rc2-95-367.18-2.bee index 86e39d9db..510e1889d 100755 --- a/nvidia_linux-4.8_rc2-95-367.18-1.bee +++ b/nvidia_linux-4.8_rc2-95-367.18-2.bee @@ -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