forked from aferrero2707/appimage-testsuite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·47 lines (35 loc) · 1.31 KB
/
run.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
#! /bin/bash
ai="$1"
distro="$2"
IP=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
xhost + $IP
if [ -e Dockerfile.${distro} ]; then
(rm -rf build && mkdir build && cd build && cp -aL ../Dockerfile.${distro} Dockerfile && \
docker build -t photoflow/aitest-${distro} .) || exit 1
image=photoflow/aitest-${distro}
else
image=$distro
fi
chmod u+x "$ai"
docker run --rm -it -e DISPLAY=${IP}:0 -v /tmp/.X11-unix:/tmp/.X11-unix -v $(pwd):/aitest -v "$ai":/AppImage -v "$HOME":/shared --cap-add=SYS_PTRACE --security-opt seccomp:unconfined ${image} bash
exit 0
rm -rf aitest
if [ "$distro" = "debian-testing" ]; then
mkdir -p aitest
cp -a aitest-debian-testing.sh aitest/aitest.sh
cd aitest
docker run --rm -it -e DISPLAY=${IP}:0 -v /tmp/.X11-unix:/tmp/.X11-unix -v $(pwd):/aitest -v "$ai":/AppImage debian:testing
exit
fi
if [ "$distro" = "fedora-26" ]; then
mkdir -p aitest
cp -aL aitest-fedora-26.sh aitest/aitest.sh
cd aitest
docker run --rm -it -e DISPLAY=${IP}:0 -v /tmp/.X11-unix:/tmp/.X11-unix -v $(pwd):/aitest -v "$ai":/AppImage fedora:26 bash
fi
if [ "$distro" = "fedora-27" ]; then
mkdir -p aitest
cp -aL aitest-fedora-27.sh aitest/aitest.sh
cd aitest
docker run --rm -it -e DISPLAY=${IP}:0 -v /tmp/.X11-unix:/tmp/.X11-unix -v $(pwd):/aitest -v "$ai":/AppImage photoflow/aitest-${distro} bash
fi