diff options
| author | Jonathan Bauer | 2013-04-17 16:25:38 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2013-04-17 16:25:38 +0200 |
| commit | a8b11556ccee779ba5bc988d3efae16f4d68b174 (patch) | |
| tree | 30b722408f67d03a1adf1be3ceccb4e33b05443a | |
| parent | delete symlink.. (diff) | |
| download | tm-scripts-a8b11556ccee779ba5bc988d3efae16f4d68b174.tar.gz tm-scripts-a8b11556ccee779ba5bc988d3efae16f4d68b174.tar.xz tm-scripts-a8b11556ccee779ba5bc988d3efae16f4d68b174.zip | |
kernel compile preparations
| -rw-r--r-- | helper/kernel.inc | 12 | ||||
| -rw-r--r-- | helper/string.inc | 9 |
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' +} |
