Files
mkbootimg_tools/ARM/mkboot
ModdingMyMind d3a0d9d963 Manipulate shebang
- This project will work on linux. Confirmed working on Ubuntu 15.04.

I have added a wrapper script which manipulates the limited usage of a shebang that allows the real mkboot script to be executed by the bash binary from within the project directory.

This eliminates the previous requirement of having to place bash at /system/xbin.
2015-09-07 00:52:15 -04:00

17 lines
648 B
Plaintext
Executable File

# This is a wrapper script which basically manipulates the boundaries of an already limited shebang.
# This allows the execution of the real mkboot (aka wrapper) script using bash from the project directory whether it be on Linux or an ARM device.
target=$(pwd)
script="${target}/wrapper"
shebang=$(head -1 "$script")
buildit="$@"
# Use an array in case a argument is there too
interp=( ${shebang#\#!} )
# Now run it, passing in the remaining command line arguments
# EXAMPLE 1: Unpacking: ./mkboot recovery.img recoveryfolder
# EXAMPLE 2: Packing: ./mkboot recoveryfolder recovery.img
shift 1
exec "${target}/${interp[@]}" "$script" ${buildit}