summaryrefslogtreecommitdiffstats
path: root/remote/includes/kernel.inc
diff options
context:
space:
mode:
authorJonathan Bauer2014-06-16 15:16:33 +0200
committerJonathan Bauer2014-06-16 15:16:33 +0200
commitc839f1511174e639b0a7fa28dbe9a4b14b07056b (patch)
tree7521b5cb75f885961e753452f870ced26ec2ab4e /remote/includes/kernel.inc
parentgrep (diff)
downloadtm-scripts-c839f1511174e639b0a7fa28dbe9a4b14b07056b.tar.gz
tm-scripts-c839f1511174e639b0a7fa28dbe9a4b14b07056b.tar.xz
tm-scripts-c839f1511174e639b0a7fa28dbe9a4b14b07056b.zip
[kernel.inc] fix bad cd's.
Diffstat (limited to 'remote/includes/kernel.inc')
-rw-r--r--remote/includes/kernel.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/remote/includes/kernel.inc b/remote/includes/kernel.inc
index 839edcc3..dc7f7f12 100644
--- a/remote/includes/kernel.inc
+++ b/remote/includes/kernel.inc
@@ -53,6 +53,8 @@ copy_kernel_modules() {
check_kernel_base_dir
+
+ local OLD_DIR="$(pwd)"
#
# process modules list
@@ -121,18 +123,19 @@ copy_kernel_modules() {
cp "${KERNEL_MODULES_DIR}/modules.builtin" "${TARGET_BUILD_DIR}/${KERNEL_MODULES_DIR}"
# with modules.order and modules.builtin, we can run depmod for the rest of the files
depmod -b "${TARGET_BUILD_DIR}" -a "${KERNEL_NEW_VERSION}"
-
- cd - >/dev/null
+
+ # go back to wherever we were
+ cd "${OLD_DIR}" || perror "Could not cd back to ${OLD_DIR}."
}
copy_firmware() {
pinfo "Copying firmware for kernel ${KERNEL_CURRENT_VERSION}..."
[ -z "${REQUIRED_FIRMWARE}" ] && perror "REQUIRED_FIRMWARE is empty. Check your config file."
- local OLD_DIR=$(pwd)
check_kernel_base_dir
+ local OLD_DIR=$(pwd)
#
# process firmware list
#
@@ -199,7 +202,7 @@ copy_firmware() {
fi
fi
- cd "$OLD_DIR"
+ cd "${OLD_DIR}" || perror "Could not cd back to ${OLD_DIR}."
}
copy_kernel() {