diff options
author | Simon Rettberg | 2013-06-13 13:56:37 +0200 |
---|---|---|
committer | Simon Rettberg | 2013-06-13 13:56:37 +0200 |
commit | 7300eb14210c373480ee73f142970f0d77f205c9 (patch) | |
tree | 8c3d258917a095f7a16b326200fd0a139d81a761 /helper | |
parent | [fileutil.inc] remove debug message (diff) | |
download | tm-scripts-7300eb14210c373480ee73f142970f0d77f205c9.tar.gz tm-scripts-7300eb14210c373480ee73f142970f0d77f205c9.tar.xz tm-scripts-7300eb14210c373480ee73f142970f0d77f205c9.zip |
[kernel] fix copying firmware
Diffstat (limited to 'helper')
-rw-r--r-- | helper/kernel.inc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/helper/kernel.inc b/helper/kernel.inc index 70294357..a5989b15 100644 --- a/helper/kernel.inc +++ b/helper/kernel.inc @@ -151,9 +151,13 @@ copy_firmware() { # post-process to fix the path of the firmwares found on the system unter /lib/firmware/$(uname -r) # which have to be copied to /lib/firmware/${KERNEL_NEW_VERSION} - mkdir -p "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_NEW_VERSION}/" - mv "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION}/"* "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_NEW_VERSION}/" - rmdir "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION}/" || perror "something went very wrong..." + if [ -d "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION}" ]; then + mkdir -p "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_NEW_VERSION}/" + mv "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION}/"* "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_NEW_VERSION}/" + rmdir "${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION}/" || perror "something went very wrong..." + else + pdebug "No ${TARGET_BUILD_DIR}/lib/firmware/${KERNEL_VERSION} directory, skipping the merge." + fi cd - >/dev/null } |