bionic/tests/touch-obj-on-success

12 lines
222 B
Plaintext
Raw Normal View History

2025-08-25 08:22:42 +08:00
#!/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