summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xclean.sh20
1 files changed, 8 insertions, 12 deletions
diff --git a/clean.sh b/clean.sh
index 28c00f7..83dea23 100755
--- a/clean.sh
+++ b/clean.sh
@@ -1,15 +1,11 @@
-#!/bin/sh
+#!/usr/bin/env bash
make clean
-rm -rf CMakeCache.txt \
- CMakeFiles \
- cmake_install.cmake \
- cmake_uninstall.cmake \
- Makefile \
- install_manifest.txt \
- data/tuxanci.desktop \
- src/base/path.h \
- {data,po}/{CMakeFiles,Makefile,cmake_install.cmake} \
- data/{arena,conf,font,images,music,sound}/{CMakeFiles,Makefile,cmake_install.cmake} \
- src/{CMakeFiles,cmake_install.cmake,Makefile,modules/{CMakeFiles,cmake_install.cmake,Makefile}}
+# remove folders
+find ./ -type d -name CMakeFiles -print |xargs -i rm {} -rf
+# remove cmake files
+find ./ \( -type f -name \*.cmake -print , -type f -name CMakeCache.txt -print , -type f -name Makefile -print \) |grep -v "./cmake" |xargs -i rm {} -rf
+find ./ -type f -name cmake_install.cmake |xargs -i rm {} -rf
+# remove precompiled in files
+find ./ -name \*.in -print |while read r; do rm -rf ${r/\.in/}; done