File: purify-source-tree.sh

package info (click to toggle)
openms 2.4.0-real-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 646,136 kB
  • sloc: cpp: 392,260; xml: 215,373; python: 10,976; ansic: 3,325; php: 2,482; sh: 901; ruby: 399; makefile: 141; perl: 85
file content (34 lines) | stat: -rwxr-xr-x 895 bytes parent folder | download
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
#!/bin/sh

echo $(pwd)

# Remove all unwanted files/dirs.
echo "Now removing the whole contrib directory"
find . -name "contrib" -type d -exec rm -rfv '{}' \; >  /dev/null 2>&1

echo "Now removing all the .exe files"
find . -name "*.exe" -type f -exec rm -rvf '{}' \;

echo "Now removing all the .dll files"
find . -name "*.dll" -type f -exec rm -rvf '{}' \;

echo "Now removing all the .pyc files"
find . -name "*.pyc" -type f -exec rm -rvf '{}' \;

echo "Now removing all the .git* files"
find . -name "\.git*" -exec rm -rvf '{}' \;

echo "Now removing all the doxygen-based html/* file"
rm -rfv doc/html/*

# Remove all the exec bits from files that $(file) considers not
# binary.
for item in $(find -type f -executable)
do file ${item} | grep -i "elf "
    if [ "$?" != "0" ]
    then 
        echo "file ${item} not binary. Running chmod a-x on it."
        chmod a-x ${item}
    fi
done