翻译一下代码#!datadatacomtermuxfilesusrbinenv bash#########################main check_chroot_file source_env_file check_tmoe_container_chroot start_menu################source_env_file case
#!/data/data/com.termux/files/usr/bin/env bash ######################### main() { # 检查 chroot 文件 check_chroot_file # 导入环境变量文件 source_env_file # 检查 tmoe 容器的 chroot check_tmoe_container_chroot # 启动菜单 start_menu } ################ source_env_file() { case $(uname -o) in Android) TMOE_LINUX_DIR="${HOME}/.local/share/tmoe-linux" ;; *) TMOE_LINUX_DIR="/usr/local/etc/tmoe-linux" TMPDIR=/tmp ;; esac TMOE_GIT_DIR="${TMOE_LINUX_DIR}/git" TMOE_SHARE_DIR="${TMOE_GIT_DIR}/share/old-version/share" TMOE_CONTAINER_DIR="${TMOE_LINUX_DIR}/containers" ENV_FILE="${TMOE_SHARE_DIR}/environment/manager_environment" source ${ENV_FILE} } ########### check_chroot_file() { CONFIG_FOLDER=${HOME}/.config/tmoe-linux TMOE_CHROOT=false [[ ! -e "${CONFIG_FOLDER}/chroot_container" ]] || TMOE_CHROOT=true } ########### start_menu() { # 导入容器列表 source ${TMOE_SHARE_DIR}/container/list # 检查 proot 或 chroot check_proot_or_chroot RETURN_TO_WHERE_02='exit' # 列出已安装的 tmoe 容器 list_installed_tmoe_containers } main "$@
原文地址: https://www.cveoy.top/t/topic/hvcs 著作权归作者所有。请勿转载和采集!