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

This commit is contained in:
Ing 2025-09-26 23:23:18 +08:00
parent 262559fa06
commit a1734d9a76
4 changed files with 5 additions and 4 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")" \

View File

@ -197,7 +197,7 @@ def getpats(workpath, jsonpath, xlsxpath):
continue
V = __fullversion(f"{S['build_ver']}-{S['build_num']}-{S['nano']}")
if V not in pats[M]:
reqPat = session.head(S['files'][0]['url'].split('?')[0], timeout=10, verify=False)
reqPat = session.head(S['files'][0]['url'].split('?')[0].replace("global.synologydownload.com", "global.download.synology.com"), timeout=10, verify=False)
if reqPat.status_code == 403:
continue
pats[M][V] = {