-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathclean-all.sh
More file actions
executable file
·49 lines (34 loc) · 1.14 KB
/
clean-all.sh
File metadata and controls
executable file
·49 lines (34 loc) · 1.14 KB
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
42
43
44
45
46
47
48
49
#!/bin/bash
#
# @file clean-all.sh
# clean all intermediate files.
#
# @author: 350137278@qq.com
#
# @create: 2020-07-05
# @update: 2020-07-05
########################################################################
_file=$(readlink -f $0)
_cdir=$(dirname $_file)
_name=$(basename $_file)
_ver=1.0.0
# Treat unset variables as an error (set -u / +u)
set -o nounset
# Treat any error as exit (set -e / +e)
set -o errexit
################################################################
echo "[1] clean msvc build files"
bindir=$_cdir/libshttpd
rm -rf "$bindir"
rm -rf "$_cdir/msvc/shttpd.VC.db"
find "$_cdir/msvc/example/" -maxdepth 1 \
-not -name 'example' -and \
-not -name 'example.vcxproj' \
-and -not -name 'example.vcxproj.filters' | xargs rm -rf
find "$_cdir/msvc/libshttpd/" -maxdepth 1 -not -name 'libshttpd' -and -not -name 'libshttpd.vcxproj*' | xargs rm -rf
find "$_cdir/msvc/shttpd/" -maxdepth 1 -not -name 'shttpd' -and -not -name 'shttpd.vcxproj*' | xargs rm -rf
echo "[1] clean linux make files"
cd $_cdir/src && make clean
echo "[2] clean examples make files"
cd $_cdir/examples && make clean
echo "Clean all files success."