From a8b11556ccee779ba5bc988d3efae16f4d68b174 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Wed, 17 Apr 2013 16:25:38 +0200 Subject: kernel compile preparations --- helper/kernel.inc | 12 ++++++++++++ helper/string.inc | 9 +++++++++ 2 files changed, 21 insertions(+) diff --git a/helper/kernel.inc b/helper/kernel.inc index f37ca8f3..bae07afa 100644 --- a/helper/kernel.inc +++ b/helper/kernel.inc @@ -136,3 +136,15 @@ copy_kernel() { pinfo "You may want to update your systems firmware/modules to match the current kernel." } +fetch_source() { + + if [ "x$PACKET_MANAGER" == "apt" ]; then + apt-get source linux-image-${KERNEL_VERSION} + elif [ "x$PACKET_MANAGER" == "zypper" ]; then + # TODO + fi +} +build_kernel() { + : +} + diff --git a/helper/string.inc b/helper/string.inc index 0a166708..9f18e4e0 100644 --- a/helper/string.inc +++ b/helper/string.inc @@ -12,3 +12,12 @@ trim() { canonicalize() { cd -P -- "$(dirname -- "$1")" && printf '%s\n' "$(pwd -P)/$(basename -- "$1")" } + +escape_search() { + sed -e 's/[]\/()$*.^|[]/\\&/g' + +} + +escape_replace() { + sed -e 's/[\/&]/\\&/g' +} -- cgit v1.2.3-55-g7522