-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathchecks.bash
55 lines (48 loc) · 905 Bytes
/
checks.bash
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
function GRANT_CHECK {
if [ -z "$GRANT" ]
then
echo No grant provided.
return 0
fi
# if ! checkgrant $GRANT
# then
# echo No such grant: $GRANT
# return 1
# fi
return 0
}
function TCLB_CHECK {
if [ ! -d "$TCLB/src" ]
then
echo there is no src subdirectory - something is wrong
echo file not found: $TCLB/src
return 1;
else
TCLB=$(cd $TCLB; pwd)
fi
return 0
}
function MODULES_CHECK {
# "On RYSY modules shall be checked on computational node" #
if test "$MODULES_CHECK_AVAILABILITY" == "y"
then
echo "Checking availability of the modules..."
for i in $@
do
if [ -z "$(module av $i 2>&1)" ]
then
echo there is no module $i
return 1;
fi
done
else
echo "Availability of the modules check skipped..."
fi
return 0;
}
function MODULES_RUN_CHECK {
MODULES_CHECK $MODULES_RUN
}
function MODULES_ADD_CHECK {
MODULES_CHECK $MODULES_ADD
}