Add a http performance test script based on wrk
[iec.git] / src / type3_AndroidCloud / anbox-master / scripts / snap-wrapper.sh
1 #!/bin/bash
2
3 if [ "$SNAP_ARCH" = "amd64" ]; then
4         ARCH="x86_64-linux-gnu"
5 elif [ "$SNAP_ARCH" = "armhf" ]; then
6         ARCH="arm-linux-gnueabihf"
7 else
8         ARCH="$SNAP_ARCH-linux-gnu"
9 fi
10
11 # With recent builds on Ubuntu 16.04 the snap does not find the path to
12 # libpulsecommon-8.0.so anymore so we have to teach the linker manually
13 # where it can be found
14 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/$ARCH/pulseaudio"
15
16 # liblxc.so.1 is in $SNAP/lib
17 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/lib"
18
19 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/$ARCH"
20
21 # We set XDG_DATA_HOME to SNAP_USER_COMMON here as this will be the location we will
22 # create all our application launchers in. The system application launcher will
23 # be configured by our installer to look into this directory for available
24 # launchers.
25 export XDG_DATA_HOME="$SNAP_USER_COMMON/app-data"
26
27 # In order to support GLVND based systems we need to work around a bug in snapd
28 # as it does not yet expose the EGL vendor configurations from the host to snaps.
29 # As long as this isn't fixed we have to carry a set of configs on our own which
30 # may map to the host. GLVND will handle situation properly where a vendor is
31 # configured but the actual EGL implementation is missing.
32 export __EGL_VENDOR_LIBRARY_DIRS="$SNAP/glvnd"
33
34 # Suppress "libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering." spam
35 export EGL_LOG_LEVEL="fatal"
36
37 enable_debug="$(snapctl get debug.enable)"
38 if [ "$enable_debug" = true ]; then
39         export ANBOX_LOG_LEVEL=debug
40 fi
41
42 if [ "$(snapctl get software-rendering.enable)" = true ]; then
43         export ANBOX_FORCE_SOFTWARE_RENDERING=true
44 fi
45
46 if [ "$(snapctl get touch-emulation.enable)" = false ]; then
47         export ANBOX_ENABLE_TOUCH_EMULATION=false
48 fi
49
50 if [ "$(snapctl get server-side-decoration.enable)" = true ]; then
51         export ANBOX_FORCE_SERVER_SIDE_DECORATION=true
52 fi
53
54 # Use custom Anbox binary for debugging purposes if available
55 ANBOX="$SNAP"/usr/bin/anbox
56 if [ -e "$SNAP_COMMON"/anbox.debug ]; then
57         ANBOX="$SNAP_COMMON"/anbox.debug
58 fi
59
60 exec "$ANBOX" "$@"