diff options
author | osm0sis <osm0sis@outlook.com> | 2016-03-16 14:08:50 -0300 |
---|---|---|
committer | osm0sis <osm0sis@outlook.com> | 2016-03-16 14:08:50 -0300 |
commit | ea57ded2c2e9075d0496f4e4531e1a33623463ea (patch) | |
tree | b45928b3e903620e642cc70aeb407f3858abb89b /anykernel.sh | |
parent | a5bb583af5945628737aac32a55dc4d8835273c5 (diff) |
AK2: simplify new contains(), adjust placement, and update documentation
Diffstat (limited to 'anykernel.sh')
-rwxr-xr-x | anykernel.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/anykernel.sh b/anykernel.sh index 86d9ff9..cb63d95 100755 --- a/anykernel.sh +++ b/anykernel.sh @@ -31,8 +31,13 @@ chmod -R 755 $bin; mkdir -p $ramdisk $split_img; OUTFD=/proc/self/fd/$1; + +# ui_print <text> ui_print() { echo -e "ui_print $1\nui_print" > $OUTFD; } +# contains <string> <substring> +contains() { test "${1#*$2}" != "$1" && return 0 || return 1; } + # dump boot and extract ramdisk dump_boot() { dd if=$block of=/tmp/anykernel/boot.img; @@ -50,11 +55,6 @@ dump_boot() { cp -af /tmp/anykernel/rdtmp/* $ramdisk; } -# contains <string> <substring> -contains() { - if test "${1#*$2}" != "$1"; then return 0; else return 1; fi; -} - # repack ramdisk then build and write image write_boot() { cd $split_img; |