platform_bionic/tests/touch-obj-on-success
Elliott Hughes 165a8c6653 Stop using grep -P.
This might let us get to using toybox grep for the build faster than if
we have to implement PCRE support.

Test: builds
Change-Id: Idaf24cfefbf18fdc442871f24fe4fe9b2152359a
2019-07-08 15:03:19 -07:00

11 lines
222 B
Bash
Executable file

#!/bin/bash -eu
#
# Runs the given C/C++ compile-ish command. On success, scrapes an object file
# from that command line and touches it.
"$@"
for arg in "$@"; do
if [[ "$arg" == *.o ]]; then
touch "$arg"
fi
done