mksh: add mkshrc when using TW_USE_TOOLBOX

Fixes broken shell prompt in Terminal and adb shell

Before: https://del.dog/7vphlkc
After: https://del.dog/vhkjgo8

Add as prebuilt with suffix "_twrp" to avoid conflict
with original mkshrc and rename via POST_INSTALL_CMD

Prebuilt version adjusts TMPDIR variable from
"/data/local/tmp" to "/tmp" for TWRP

Change-Id: I42a1b2a8c114f66dbe659c07485f1dfae8a5d314
diff --git a/etc/Android.mk b/etc/Android.mk
index cda0f37..4aeb251 100644
--- a/etc/Android.mk
+++ b/etc/Android.mk
@@ -88,3 +88,18 @@
         include $(BUILD_PREBUILT)
     endif
 endif
+
+ifeq ($(TW_USE_TOOLBOX), true)
+    include $(CLEAR_VARS)
+    LOCAL_MODULE := init.recovery.mksh.rc
+    LOCAL_MODULE_TAGS := eng
+    LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
+
+    # Cannot send to TARGET_RECOVERY_ROOT_OUT since build system wipes init*.rc
+    # during ramdisk creation and only allows init.recovery.*.rc files to be copied
+    # from TARGET_ROOT_OUT thereafter
+    LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
+
+    LOCAL_SRC_FILES := $(LOCAL_MODULE)
+    include $(BUILD_PREBUILT)
+endif