优化运行库显示方式

This commit is contained in:
2023-07-11 15:08:28 +08:00
parent 6c43ce51b4
commit f63cdff0aa
2 changed files with 14 additions and 11 deletions

View File

@@ -1,12 +1,16 @@
#!/bin/bash
CURRENT_DIR=$(cd $(dirname $0); pwd)
if [[ ! -d "$CURRENT_DIR/usr" ]]; then
zenity --info --text=未安装运行库,无法运行 --no-wrap
exit
fi
if [[ ! -d /lib64 ]]; then
pkexec mkdir /lib64 -p
fi
bwrap --dev-bind / / \
--ro-bind $CURRENT_DIR/lib /lib \
--ro-bind $CURRENT_DIR/lib64 /lib \
--ro-bind $CURRENT_DIR/usr /usr \
--ro-bind "$CURRENT_DIR/lib" /lib \
--ro-bind "$CURRENT_DIR/lib64" /lib \
--ro-bind "$CURRENT_DIR/usr" /usr \
--ro-bind /usr/share /usr/share \
--ro-bind /usr/bin /usr/bin \
--ro-bind /usr/sbin /usr/sbin \