-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstartVSCodiumForCoraTempSetup.sh
executable file
·41 lines (38 loc) · 1.25 KB
/
startVSCodiumForCoraTempSetup.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
#USER=$1
USER=$(id -u -n)
BASEDIR=$(dirname $BASH_SOURCE)
VSCODIUMBRANCH=$2
RECOMMENDEDSETUP=$3
echo
echo "running startEclipseForCoraTempSetup.sh..."
echo starting vscodium using:
echo userName: $USER
echo cora-vscodium branch: $VSCODIUMBRANCH
echo recommended setup: $RECOMMENDEDSETUP
echo
echo "Testing for container runtimes...."
CONTAINERRUNTIME=podman;
DOCKER_EXISTS=$(command -v docker)
echo "Docker size: "${#DOCKER_EXISTS}
if [ ${#DOCKER_EXISTS} -gt 0 ]; then
CONTAINERRUNTIME=docker;
fi
echo "Container runtime will be "${CONTAINERRUNTIME}
if [ ! $USER ]; then
echo "You must specify the userName used when starting vscodium1_67_2forcora2TempSetup"
else
cd vscodium1_67_2forcora2
#${CONTAINERRUNTIME} run --rm -ti --privileged --net=host --ipc=host --env="QT_X11_NO_MITSHM=1" -e DISPLAY=$DISPLAY \
${CONTAINERRUNTIME} run --rm -ti --privileged --ipc=host --env="QT_X11_NO_MITSHM=1" -e DISPLAY=$DISPLAY \
-v /var/run/docker.sock:/var/run/docker.sock\
-v /tmp/.X11-unix:/tmp/.X11-unix\
-v INSTALLDIR/workspace:/home/$USER/workspace\
-v INSTALLDIR/vscodium:/home/$USER/vscodium\
-e user=$USER\
-e vscodiumbranch=$VSCODIUMBRANCH\
-e RECOMMENDEDSETUP=$RECOMMENDEDSETUP\
--name vscodium1_67_2forcora2TempSetup\
vscodium1_67_2forcora2
cd ../
fi