android_external_toybox/post_update.sh
Elliott Hughes e6fa961209 Clean up our local .gitignore differences.
There's no good reason I can recall why I used the leading '.' on these
filenames, and removing it lets us not carry any local changes to
.gitignore and gives future maintainers one less thing to worry about.

Test: ./post_update.sh . && mm -j
Change-Id: I2de354147eb9c08acab217b9779497a9a29dbeeb
2024-01-30 21:32:06 +00:00

34 lines
611 B
Bash
Executable File

#!/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/
make allnoconfig KCONFIG_ALLCONFIG=config-$which
}
generate "device"
generate "linux"
generate "mac"
rm -rf .config