更新 menu.sh 脚本的条件判断,支持在无参数情况下执行

This commit is contained in:
Ing 2025-09-26 21:50:56 +08:00
parent 262559fa06
commit 9dc8c85fee
3 changed files with 4 additions and 3 deletions

View File

@ -65,7 +65,7 @@ jobs:
sudo losetup -P "${LOOPX}" "rr/rr.img"
rm -rf "/tmp/mnt/p3"
mkdir -p "/tmp/mnt/p3"
mount "${LOOPX}p3" "/tmp/mnt/p3"
sudo mount "${LOOPX}p3" "/tmp/mnt/p3"
unpackInitrd /tmp/mnt/p3/initrd-rr "rr/initrd"
sudo apt update

View File

@ -193,7 +193,7 @@ jobs:
echo "Building..."
{
echo ". include/functions.sh"
echo ". menu.sh"
[ -n "${{ env.language }}" ] && echo "echo \"${{ env.language }}.UTF-8\" >/mnt/p1/.locale"
[ -n "${{ env.tips }}" ] && echo "echo -e \"${{ env.tips }}\" >/mnt/p3/AddTips"
[ -n "${{ env.kernel }}" ] && echo "writeConfigKey \"kernel\" \"${{ env.kernel }}\" \"\${USER_CONFIG_FILE}\""

View File

@ -4067,8 +4067,9 @@ function notepadMenu() {
###############################################################################
###############################################################################
if [ $# -ge 1 ]; then
if [ ! "$(basename -- "${0}")" = "$(basename -- "${BASH_SOURCE[0]}")" ] && [ $# -gt 0 ]; then
"$@"
cleanup_lock
else
if [ -z "${MODEL}" ] && [ -z "${PRODUCTVER}" ] && [ -n "$(findDSMRoot)" ]; then
DIALOG --title "$(TEXT "Main menu")" \