-
Notifications
You must be signed in to change notification settings - Fork 25
/
clean.sh
55 lines (41 loc) · 1.05 KB
/
clean.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
version="1.0.4"
db_file="$version.db"
shopt -u extglob
echo "-----------Cleaning Files and Folders---------"
##remove files from entity standardization models
if [ -d models/ ]; then
rm -rf models/
fi
if [ -d kg/ ]; then
#save infer_negative.json
cp kg/infer_negative.json /app/
fi
#remove files from ontologies
if [ -d kg/ ]; then
cd kg/
GLOBIGNORE=infer_negative.json
rm -v *
cd ..
fi
## remove db file from DB
if [[ -f db/$db_file ]]; then
rm db/$db_file
fi
## remove files from data for entity standardization training/experiments
if [[ -d data/ ]]; then
rm -rf data/
fi
## remove packages from entity standardizer
cd entity_standardizer
pip3 uninstall dist/entity_standardizer_tca-1.0-py3-none-any.whl -y
cd ..
if [[ -d entity_standardizer/dist/ ]]; then
rm -rf entity_standardizer/dist/
fi
if [[ -d entity_standardizer/entity_standardizer_tca.egg-info/ ]]; then
rm -rf entity_standardizer/entity_standardizer_tca.egg-info/
fi
## remove any logs
rm *.log
echo "-----------Cleaning Completed---------"