I have a binary that repacks android kernel (not mkbootimg). I'm making a script to automate the process.
I don't want any output on the screen. So I have redirected the output to a file named foo.log.
The command is - kernel_make "$zImage" "$ramdisk" "$cmdline" "$image" &> data/local/working/foo.log
My current working folder is data/local/working/.
What I've to do is, if the last line of the output (foo.log) is this -
"targed file $1 is patched sucesfully, enjoy new kernel"
Then return 0 and exit. Else return 1 and exit.
I'm trying to do with grep, but as I'm new to command line, do don't have any idea of doing it the right way.