aboutsummaryrefslogtreecommitdiffstats
path: root/clean
blob: 936199844924e84caef35a1ba30b9563a06e036e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

if command -v redo-targets >/dev/null 2>&1; then
	mapfile -t targets < <(redo-targets)
fi

rm -f .vars.rc all compile_commands.json libpack test test_gen
find . -type f \
       \( -name '*.cmd' -o -name '*.inc' -o -name '*.o' -o -name '*.tool' \) \
       -delete

for t in "${targets[@]}"; do
	if [ -e "$t" ]; then
		echo "$0: Missed '$t'. Removing!" >&2
		rm "$t"
	fi
done