summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthat <github@that.at>2016-08-10 21:04:26 +0200
committerDees Troy <dees_troy@teamw.in>2016-08-22 16:46:09 +0200
commit0e2140e9310f15e658ac93b9fbe910cb2f2bd794 (patch)
tree3f7741159d641621beadee42f24d6386bf95161d
parentGUI: Use standard routine for auto-reboot (diff)
downloadandroid_bootable_recovery-0e2140e9310f15e658ac93b9fbe910cb2f2bd794.tar
android_bootable_recovery-0e2140e9310f15e658ac93b9fbe910cb2f2bd794.tar.gz
android_bootable_recovery-0e2140e9310f15e658ac93b9fbe910cb2f2bd794.tar.bz2
android_bootable_recovery-0e2140e9310f15e658ac93b9fbe910cb2f2bd794.tar.lz
android_bootable_recovery-0e2140e9310f15e658ac93b9fbe910cb2f2bd794.tar.xz
android_bootable_recovery-0e2140e9310f15e658ac93b9fbe910cb2f2bd794.tar.zst
android_bootable_recovery-0e2140e9310f15e658ac93b9fbe910cb2f2bd794.zip
Diffstat (limited to '')
-rw-r--r--Android.mk6
-rw-r--r--twrp.cpp4
2 files changed, 8 insertions, 2 deletions
diff --git a/Android.mk b/Android.mk
index 67e504f12..326c24992 100644
--- a/Android.mk
+++ b/Android.mk
@@ -172,6 +172,12 @@ LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
LOCAL_C_INCLUDES += system/extras/ext4_utils
+tw_git_revision := $(shell git -C $(LOCAL_PATH) rev-parse --short=8 HEAD 2>/dev/null)
+ifeq ($(shell git -C $(LOCAL_PATH) diff --quiet; echo $$?),1)
+ tw_git_revision := $(tw_git_revision)-dirty
+endif
+LOCAL_CFLAGS += -DTW_GIT_REVISION='"$(tw_git_revision)"'
+
#TWRP Build Flags
ifeq ($(TW_EXCLUDE_MTP),)
LOCAL_SHARED_LIBRARIES += libtwrpmtp
diff --git a/twrp.cpp b/twrp.cpp
index 96d24b86b..5d64694d8 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -110,11 +110,11 @@ int main(int argc, char **argv) {
property_set("ro.twrp.version", TW_VERSION_STR);
time_t StartupTime = time(NULL);
- printf("Starting TWRP %s on %s (pid %d)\n", TW_VERSION_STR, ctime(&StartupTime), getpid());
+ printf("Starting TWRP %s-%s on %s (pid %d)\n", TW_VERSION_STR, TW_GIT_REVISION, ctime(&StartupTime), getpid());
// Load default values to set DataManager constants and handle ifdefs
DataManager::SetDefaultValues();
- printf("Starting the UI...");
+ printf("Starting the UI...\n");
gui_init();
printf("=> Linking mtab\n");
symlink("/proc/mounts", "/etc/mtab");