formatting corrections
This commit is contained in:
parent
73c2cb2d21
commit
65895230e3
55
run.sh
55
run.sh
@ -8,28 +8,29 @@ usage() {
|
||||
}
|
||||
|
||||
build=False
|
||||
wsl=False
|
||||
container_name="gstreamer-base"
|
||||
|
||||
while getopts ":bhc:" opt; do
|
||||
case $opt in
|
||||
b)
|
||||
build=True
|
||||
;;
|
||||
h)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
c)
|
||||
container_name=$OPTARG
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
exit 1
|
||||
;;
|
||||
:)
|
||||
echo "Option -$OPTARG requires an argument (getopts)" >&2
|
||||
exit 1
|
||||
;;
|
||||
b)
|
||||
build=True
|
||||
;;
|
||||
h)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
c)
|
||||
container_name=$OPTARG
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
exit 1
|
||||
;;
|
||||
:)
|
||||
echo "Option -$OPTARG requires an argument (getopts)" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@ -43,15 +44,15 @@ wslgPath=""
|
||||
uname -a | grep -qi wsl && wsl=True
|
||||
|
||||
if [ $wsl = "True" ]; then
|
||||
echo "wsl=true"
|
||||
wslgPath="-v /mnt/wslg:/mnt/wslg"
|
||||
echo "wsl=true"
|
||||
wslgPath="-v /mnt/wslg:/mnt/wslg"
|
||||
fi
|
||||
|
||||
docker run --rm -it \
|
||||
--network=host \
|
||||
-v /tmp/.X11-unix:/tmp/.X11-unix $wslgPath \
|
||||
-v $HOME/.Xauthority:/root/.Xauthority \
|
||||
-e DISPLAY \
|
||||
-e WAYLAND_DISPLAY \
|
||||
-e XDG_RUNTIME_DIR \
|
||||
$container_name bash
|
||||
--network=host \
|
||||
-v /tmp/.X11-unix:/tmp/.X11-unix $wslgPath \
|
||||
-v $HOME/.Xauthority:/root/.Xauthority \
|
||||
-e DISPLAY \
|
||||
-e WAYLAND_DISPLAY \
|
||||
-e XDG_RUNTIME_DIR \
|
||||
$container_name bash
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user