-
Notifications
You must be signed in to change notification settings - Fork 8
/
linux_dockerMESA.sh
executable file
·70 lines (63 loc) · 1.46 KB
/
linux_dockerMESA.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
usage="$(basename "$0") [-h] [-v num]
options:
-h show this help text
-v MESA version number. r24.03.1 (default), r23.05.1, r22.11.1, r22.05.1, r21.12.1, 15140, 12778, 12115, 11701, 11554, 11532, 10398, 10108, 10000, or 9793."
OPTIND=1 # Reset in case getopts has been used previously in the shell.
# Initialize variables:
version=r24.03.1
while getopts "hv:" opt; do
case "$opt" in
h) echo "$usage"
exit
;;
v) version=$OPTARG
;;
esac
done
shift $((OPTIND-1)) # In case I add other stuff later...
#Set to the best tag for that version number.
case "$version" in
9793) tag=9793.03
;;
10000) tag=10000.01
;;
10108) tag=10108.01
;;
10398) tag=10398.04
;;
11532) tag=11532.01
;;
11554) tag=11554.02
;;
11701) tag=11701.01
;;
12115) tag=12115.01
;;
12778) tag=12778.01
;;
15140) tag=15140.01
;;
r21.12.1) tag=r21.12.1.01
;;
r22.05.1) tag=r22.05.1.01
;;
r22.11.1) tag=r22.11.1.01
;;
r23.05.1) tag=r23.05.1.01
;;
r24.03.1) tag=r24.03.1.01
;;
esac
#echo $tag
tmp=$(command -v docker)
if [[ $? != 0 ]];then
echo "Warning docker not found"
echo 'Check docker folder is in $PATH'
exit 1
fi
docker run -it --rm \
-e DISPLAY \
-v "$PWD/docker_work":/home/docker/docker_work \
-v /tmp/.X11-unix:/tmp/.X11-unix:ro \
evbauer/mesa_lean:"$tag"