summarylogtreecommitdiffstats
path: root/bili-you
blob: c4b04ffe4a296226427475e159ef0c4c898abfae (plain)
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
#!/bin/bash

function main(){
	launch $@
}

function launch(){
	bwrap \
	--symlink usr/lib /lib \
	--symlink usr/lib64 /lib64 \
	--symlink usr/bin /bin \
	--symlink usr/bin /sbin \
	--ro-bind /opt /opt \
	--ro-bind /etc /etc \
	--ro-bind /usr /usr \
	--dev /dev \
	--dev-bind /dev/dri /dev/dri \
	--proc /proc \
	--ro-bind /sys/dev/char /sys/dev/char \
	--ro-bind /sys/devices /sys/devices \
	--ro-bind /run/dbus /run/dbus \
	--bind "$XDG_RUNTIME_DIR" "$XDG_RUNTIME_DIR" \
	--bind /tmp /tmp \
	--bind "$HOME" "$HOME" \
	--bind "$XDG_RUNTIME_DIR" "$XDG_RUNTIME_DIR" \
	env GTK_USE_PORTAL=1 /opt/bili_you/bili_you "$@"
	exit $?
}

main $@