forked from cavalab/srbench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·53 lines (45 loc) · 1.42 KB
/
install.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
# note: make sure conda environment is installed
# and activated before running install.
# see configure.sh
# or run this as:
# conda run -n srbench bash install.sh
failed=()
succeeded=()
# install methods
echo "////////////////////////////////////////"
echo "installing SR methods from scripts..."
echo "////////////////////////////////////////"
# move to methods folder
cd experiment/methods/src/
# install all methods
for install_file in $(ls *.sh) ; do
echo "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv"
echo ".................... Running $install_file..."
name=${install_file%.sh}
# Option to redirect logs:
# bash ${install_file} > "${name}.log" 2> "${name}.err"
bash ${install_file}
if [ $? -gt 0 ];
then
# failed+=("${install_file}")
failed+=("$name")
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $install_file FAILED"
else
succeeded+=("$install_file")
echo "........................................ $install_file complete"
fi
echo "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
done
echo "${#succeeded[@]} successful installs:"
for s in ${succeeded[@]} ; do
echo " "$s
done
echo "${#failed[@]} failed installs:"
for f in ${failed[@]} ; do
echo " "$f
done
if [ ${#failed[@]} -gt 0 ] ; then
exit 1
else
echo "All installations completed successfully."
fi