-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
.cleanup.sh
executable file
·41 lines (29 loc) · 1.13 KB
/
.cleanup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
set -e
cd $(dirname ${0})
PAWPAW_ROOT="${PWD}"
# ---------------------------------------------------------------------------------------------------------------------
target="${1}"
if [ -z "${target}" ]; then
echo "usage: ${0} <target>"
exit 1
fi
# ---------------------------------------------------------------------------------------------------------------------
source setup/check_target.sh
source setup/env.sh
# ---------------------------------------------------------------------------------------------------------------------
set -u
echo "Cleaning up build dir..."
rm -rf ${PAWPAW_BUILDDIR}/*/*
rm -rf ${PAWPAW_BUILDDIR}/*/._*
rm -rf ${PAWPAW_BUILDDIR}/*/.hg*
rm -rf ${PAWPAW_BUILDDIR}/*/.git*
rm -rf ${PAWPAW_BUILDDIR}/*/.waf-*
rm -rf ${PAWPAW_BUILDDIR}/*/.deps
rm -rf ${PAWPAW_BUILDDIR}/*/.libs
rm -rf ${PAWPAW_BUILDDIR}/*/.lock-waf_linux_build
for dir in $(find "${PAWPAW_BUILDDIR}" -maxdepth 1 -type d); do
echo "Directory '${dir}' is now clean"
touch ${dir}/.stamp_cleanup
done
# ---------------------------------------------------------------------------------------------------------------------