From 51931e2522b6703c5e9aa89419db5783c71843ed Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Thu, 19 Sep 2019 15:32:40 +0100 Subject: Restore TEST_MAPPING files removed during repackaging Running a script like external/conscrypt/srcgen/generate_android_src.sh removed the TEST_MAPPING files. This change restores them by checking them out of git. This does mean that if a TEST_MAPPING file has been edited that the changes will be lost. Test: external/conscrypt/srcgen/generate_android_src.sh Change-Id: Ifedff3823f14a7a098a677709bf1ce89b5a8c22d --- scripts/repackage-common.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/repackage-common.sh b/scripts/repackage-common.sh index 23985b2..94af157 100644 --- a/scripts/repackage-common.sh +++ b/scripts/repackage-common.sh @@ -163,6 +163,9 @@ function do_transform() { --target-dir ${SRC_OUT_DIR} \ --change-log ${CHANGE_LOG} \ ${REPACKAGE_ARGS} + + # Restore TEST_MAPPING files that may have been removed from the source directory + (cd $SRC_OUT_DIR; git checkout HEAD $(git status --short | grep -E "^ D .*/TEST_MAPPING$" | cut -c4-)) } REPACKAGED_DIR=${PROJECT_DIR}/repackaged -- cgit v1.2.3