2023-12-03 10:01:50 +08:00
|
|
|
#!/bin/bash
|
|
|
|
SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
|
2023-12-23 20:38:21 +08:00
|
|
|
# /opt 目录识别
|
|
|
|
option=""
|
2024-07-24 14:17:24 +08:00
|
|
|
|
2024-07-24 16:39:29 +08:00
|
|
|
if [[ -d /usr/lib32 ]] && [[ -d $SHELL_FOLDER/lib32 ]]; then
|
|
|
|
option="$option --dev-bind $SHELL_FOLDER/lib32 /usr/lib32 "
|
2024-07-24 14:17:24 +08:00
|
|
|
fi
|
|
|
|
|
2024-07-24 16:39:29 +08:00
|
|
|
if [[ -d /usr/lib64 ]] && [[ -d $SHELL_FOLDER/lib64 ]]; then
|
|
|
|
option="$option --dev-bind $SHELL_FOLDER/lib64 /usr/lib64 "
|
2024-07-24 14:17:24 +08:00
|
|
|
fi
|
|
|
|
|
2023-12-03 10:01:50 +08:00
|
|
|
"$SHELL_FOLDER/bwrap" --dev-bind / / \
|
|
|
|
--dev-bind "$SHELL_FOLDER/bin" /usr/bin \
|
|
|
|
--dev-bind "$SHELL_FOLDER/lib" /usr/lib \
|
2023-12-23 20:38:21 +08:00
|
|
|
--dev-bind /usr/lib/locale /usr/lib/locale \
|
2024-07-24 16:39:29 +08:00
|
|
|
--dev-bind "$SHELL_FOLDER/share" /usr/share \
|
2023-12-23 20:38:21 +08:00
|
|
|
$option \
|
2024-07-24 14:17:24 +08:00
|
|
|
$SHELL_FOLDER/runner/deepin-wine-runner $*
|