-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclean_project.sh
executable file
·32 lines (30 loc) · 991 Bytes
/
clean_project.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
#!/bin/bash
if [ "$PWD" != "/home/guglielmo/GithubPersonal/labIV" ]; then
echo "I think I'm in the wrong directory."
echo "I'll stop in ordert to not delete important files"
exit;
fi
find . -type f ! -path './.git/*' \
! -name '*.gitignore' \
\
! -name 'clean_project.sh' \
! -name '*.pdf' \
! -name '*.so.*' \
\
! -name '*.v' \
! -name '*.bit' \
! -name '*.xise' \
! -name '*.ucf' \
! -name '*.ngc' \
! -name 'measurement.txt' \
! -name '*.eps' \
! -name '*.png' \
! -name '*.p' \
! -name '*.csv' \
! -name '*.py' \
! -name '*.pptx'
! -path '*/Patterns/*' \
-delete
# Delete empty directories
find . -type d -empty ! -path './.git/*' \
-delete