-
Notifications
You must be signed in to change notification settings - Fork 0
/
seq.sh
executable file
·41 lines (36 loc) · 893 Bytes
/
seq.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
#!/bin/bash
SETVBIAS="$bin/setVbias -L -C setVbias_fulldetector-12-2-2019.conf -c 1-102"
CTRLHOST="gluon28.jlab.org:5692"
platform=$(uname -m)
if echo $patform | grep -q x86; then
bin=$(echo $0 | sed -s'/do_sequence.sh/bin/')
else
bin=$(echo $0 | sed -s"/do_sequence.sh/bin.$platform/")
fi
if [ ! -d $bin ]; then
echo "do_sequence.sh error - unknown platform type" $(uname -m)
exit 1
fi
function put {
echo $SETVBIAS -r 1-5 -V 50 $CTRLHOST
$SETVBIAS -r 1-5 -V 50 $CTRLHOST
echo $SETVBIAS -r $1 -g $2 $CTRLHOST
$SETVBIAS -r $1 -g $2 $3 $4 $5 $6 $CTRLHOST
}
function fin {
put 1-5 0.45 -l
echo "you are back in business again"
exit 0
}
for row in 1 2 3 4 5; do
for gval in 25 35 45; do
put $row 0.$gval
echo -n "ready for scan row${row}g${gval},"
echo -n "press enter when done, q to quit: "
read ans
if [[ "$ans" = "q" ]]; then
fin
fi
done
done
fin