summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--helper/kernel.inc12
-rw-r--r--helper/string.inc9
2 files changed, 21 insertions, 0 deletions
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'
+}