aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2021-07-18 13:11:37 +0100
committerTomasz Kramkowski <tk@the-tk.com>2021-07-18 13:11:37 +0100
commit7ba7bf2962dccd55a17d3ff92e098968226fbba3 (patch)
treec8db9978c4c56e79ab46ff5339edeba43f76de8f
parent311ca1db4ad68c7fb8b993640fda0de057387f2d (diff)
downloadpack-7ba7bf2962dccd55a17d3ff92e098968226fbba3.tar.gz
pack-7ba7bf2962dccd55a17d3ff92e098968226fbba3.tar.xz
pack-7ba7bf2962dccd55a17d3ff92e098968226fbba3.zip
Make clean use redo-targets if it exists
-rwxr-xr-xclean8
1 files changed, 6 insertions, 2 deletions
diff --git a/clean b/clean
index 8797998..ae420c3 100755
--- a/clean
+++ b/clean
@@ -1,3 +1,7 @@
#!/bin/sh
-find . -type f \( -name '*.o' -o -name '*.inc' \) -exec rm -f {} +
-rm -f .compile .link-executable .link-library .vars.rc all compile_flags.txt libpack.so test test_gen
+if command -v redo-targets >/dev/null 2>&1; then
+ redo-targets | tr '\n' '\0' | xargs -r0 rm -f
+else
+ find . -type f \( -o -name '*.o' -o -name '*.inc' \) -exec rm -f {} +
+ rm -f .compile .link-executable .link-library .vars.rc all compile_flags.txt libpack.so test test_gen
+fi