add prerelease

This commit is contained in:
Ing 2023-09-08 03:10:20 +08:00
parent d7468cade5
commit 17c01b1273
10 changed files with 1073 additions and 1045 deletions

View File

@ -227,11 +227,11 @@ else
w | awk '{print $1" "$2" "$4" "$5" "$6}' >WB
MSG=""
while test ${BOOTWAIT} -ge 0; do
MSG="$(printf "$(TEXT "%2ds (accessing arpl will interrupt boot)")" "${BOOTWAIT}")"
MSG="$(printf "\033[1;33m$(TEXT "%2ds (accessing arpl will interrupt boot)")\033[0m" "${BOOTWAIT}")"
echo -en "\r${MSG}"
w | awk '{print $1" "$2" "$4" "$5" "$6}' >WC
if ! diff WB WC >/dev/null 2>&1; then
echo -en "\r$(TEXT "A new access is connected, the boot process is interrupted.")\n"
echo -en "\r\033[1;33m$(TEXT "A new access is connected, the boot process is interrupted.")\033[0m\n"
rm -f WB WC
exit 0
fi

View File

@ -78,6 +78,7 @@ if [ ! -f "${USER_CONFIG_FILE}" ]; then
writeConfigKey "dsmlogo" "true" "${USER_CONFIG_FILE}"
writeConfigKey "directboot" "false" "${USER_CONFIG_FILE}"
writeConfigKey "notsetmacs" "false" "${USER_CONFIG_FILE}"
writeConfigKey "prerelease" "false" "${USER_CONFIG_FILE}"
writeConfigKey "bootwait" "10" "${USER_CONFIG_FILE}"
writeConfigKey "kernelway" "power" "${USER_CONFIG_FILE}"
writeConfigKey "model" "" "${USER_CONFIG_FILE}"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -30,6 +30,7 @@ LKM="$(readConfigKey "lkm" "${USER_CONFIG_FILE}")"
DSMLOGO="$(readConfigKey "dsmlogo" "${USER_CONFIG_FILE}")"
DIRECTBOOT="$(readConfigKey "directboot" "${USER_CONFIG_FILE}")"
NOTSETMACS="$(readConfigKey "notsetmacs" "${USER_CONFIG_FILE}")"
PRERELEASE="$(readConfigKey "prerelease" "${USER_CONFIG_FILE}")"
BOOTWAIT="$(readConfigKey "bootwait" "${USER_CONFIG_FILE}")"
KERNELWAY="$(readConfigKey "kernelway" "${USER_CONFIG_FILE}")"
SN="$(readConfigKey "sn" "${USER_CONFIG_FILE}")"
@ -1553,10 +1554,14 @@ function downloadExts() {
dialog --backtitle "$(backtitle)" --colors --title "${T}" \
--infobox "$(TEXT "Checking last version")" 0 0
# TAG=`curl -skL "${PROXY}https://api.github.com/repos/wjz304/arpl-addons/releases/latest" | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}'`
# In the absence of authentication, the default API access count for GitHub is 60 per hour, so removing the use of api.github.com
LATESTURL="$(curl -skL -w %{url_effective} -o /dev/null "${PROXY}${3}/releases/latest")"
TAG="${LATESTURL##*/}"
if [ "${PRERELEASE}" = "true" ]; then
TAG="$(curl -skL "${PROXY}${3}/tags" | grep /refs/tags/.*\.zip | head -1 | sed -r 's/.*\/refs\/tags\/(.*)\.zip.*$/\1/')"
else
# TAG=`curl -skL "${PROXY}https://api.github.com/repos/wjz304/arpl-addons/releases/latest" | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}'`
# In the absence of authentication, the default API access count for GitHub is 60 per hour, so removing the use of api.github.com
LATESTURL="$(curl -skL -w %{url_effective} -o /dev/null "${PROXY}${3}/releases/latest")"
TAG="${LATESTURL##*/}"
fi
[ "${TAG:0:1}" = "v" ] && TAG="${TAG:1}"
if [ -z "${TAG}" ]; then
if [ ! "${5}" = "0" ]; then
@ -1708,6 +1713,7 @@ function updateMenu() {
echo "p \"$(TEXT "Set proxy server")\"" >>"${TMP_PATH}/menu"
fi
echo "u \"$(TEXT "Local upload")\"" >>"${TMP_PATH}/menu"
echo "b \"$(TEXT "Pre Release:") \Z4${PRERELEASE}\Zn\"" >>"${TMP_PATH}/menu"
echo "e \"$(TEXT "Exit")\"" >>"${TMP_PATH}/menu"
dialog --backtitle "$(backtitle)" --colors \
@ -1838,6 +1844,11 @@ function updateMenu() {
fi
fi
;;
b)
[ "${PRERELEASE}" = "false" ] && PRERELEASE='true' || PRERELEASE='false'
writeConfigKey "prerelease" "${PRERELEASE}" "${USER_CONFIG_FILE}"
NEXT="e"
;;
e) return ;;
esac
done