From 146ec6c13c768c79456ff2a659c13b484a0b823b Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 29 Nov 2021 16:42:52 -0800 Subject: [PATCH] Re-add post_update.sh. Let's see if re-adding this file in its own change helps git. Test: N/A Change-Id: Ibe4dfa373593eaea2f7a717c81d295bf6393688b --- post_update.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 post_update.sh diff --git a/post_update.sh b/post_update.sh new file mode 100755 index 000000000..05c550cc6 --- /dev/null +++ b/post_update.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# $1 Path to the new version. +# $2 Path to the old version. + +cd $1 + +set -e + +rm -rf .config generated/ android/ + +function generate() { + which=$1 + echo -e "\n-------- $1\n" + + # These are the only generated files we actually need. + files="config.h flags.h globals.h help.h newtoys.h tags.h" + + cp .config-$which .config + NOBUILD=1 scripts/make.sh + out=android/$which/generated/ + mkdir -p $out + for f in $files; do cp generated/$f $out/$f ; done + rm -rf .config generated/ +} + +generate "device" +generate "linux" +generate "mac"