xref: /aosp_15_r20/bionic/tests/touch-obj-on-success (revision 8d67ca893c1523eb926b9080dbe4e2ffd2a27ba1)
1#!/bin/bash -eu
2#
3# Runs the given C/C++ compile-ish command. On success, scrapes an object file
4# from that command line and touches it.
5
6"$@"
7for arg in "$@"; do
8  if [[ "$arg" == *.o ]]; then
9    touch "$arg"
10  fi
11done
12