forked from mcheatham/computationalEnvironmentODP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·32 lines (26 loc) · 814 Bytes
/
run.sh
File metadata and controls
executable file
·32 lines (26 loc) · 814 Bytes
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
set -e
export LANG=en_US.UTF-8
echo ">> Gathering processor names..."
python3 bin/processors.py > data/processors.txt
echo ">> Gathering processor architectures..."
python3 bin/architectures.py > data/architectures.txt
echo ">> Gathering OS kernel names..."
python3 bin/kernels.py > data/kernels.txt
echo ">> Gathering OS distro names..."
python3 bin/distros.py > data/distros.txt
echo ">> Updating ontology..."
java -jar bin/CompEnvUpdater.jar
ontology=data/ComputationalEnvironment.rdf
if [[ -n $(git diff --name-only -- $ontology) ]]; then
echo ">> The ontology has changed."
read -p ">> Commit it [y/n]? " yn
if [[ $yn == "y" ]]; then
echo ">> Committing..."
git commit "$ontology" -m "Update ontology"
else
echo ">> Discarding..."
git checkout "$ontology"
fi
fi
echo ">> Done."