mirror of
https://github.com/dockur/windows.git
synced 2025-10-29 12:15:50 +00:00
feat: Refactor
This commit is contained in:
parent
116bb06b50
commit
c36451b431
1 changed files with 214 additions and 260 deletions
352
src/define.sh
352
src/define.sh
|
|
@ -7,6 +7,8 @@ set -Eeuo pipefail
|
||||||
: "${DETECTED:=""}"
|
: "${DETECTED:=""}"
|
||||||
: "${PLATFORM:="x64"}"
|
: "${PLATFORM:="x64"}"
|
||||||
|
|
||||||
|
MIRRORS=5
|
||||||
|
|
||||||
parseVersion() {
|
parseVersion() {
|
||||||
|
|
||||||
[ -z "$VERSION" ] && VERSION="win11"
|
[ -z "$VERSION" ] && VERSION="win11"
|
||||||
|
|
@ -40,7 +42,7 @@ parseVersion() {
|
||||||
;;
|
;;
|
||||||
"vista" | "winvista" | "windowsvista" | "windows vista" )
|
"vista" | "winvista" | "windowsvista" | "windows vista" )
|
||||||
VERSION="winvista${PLATFORM,,}"
|
VERSION="winvista${PLATFORM,,}"
|
||||||
DETECTED="winvista${PLATFORM,,}-ultimate"
|
DETECTED="winvista${PLATFORM,,}-enterprise"
|
||||||
;;
|
;;
|
||||||
"xp" | "xp32" | "winxp" | "windowsxp" | "windows xp" )
|
"xp" | "xp32" | "winxp" | "windowsxp" | "windows xp" )
|
||||||
VERSION="winxpx86"
|
VERSION="winxpx86"
|
||||||
|
|
@ -93,25 +95,28 @@ printVersion() {
|
||||||
local id="$1"
|
local id="$1"
|
||||||
local desc="$2"
|
local desc="$2"
|
||||||
|
|
||||||
[[ "$id" == "win7"* ]] && desc="Windows 7"
|
case "${id,,}" in
|
||||||
[[ "$id" == "win8"* ]] && desc="Windows 8"
|
"tiny11"* ) desc="Tiny 11" ;;
|
||||||
[[ "$id" == "win10"* ]] && desc="Windows 10"
|
"tiny10"* ) desc="Tiny 10" ;;
|
||||||
[[ "$id" == "win11"* ]] && desc="Windows 11"
|
"core11"* ) desc="Core 11" ;;
|
||||||
[[ "$id" == "winxp"* ]] && desc="Windows XP"
|
"win7"* ) desc="Windows 7" ;;
|
||||||
[[ "$id" == "winvista"* ]] && desc="Windows Vista"
|
"win8"* ) desc="Windows 8" ;;
|
||||||
|
"win10"* ) desc="Windows 10" ;;
|
||||||
|
"win11"* ) desc="Windows 11" ;;
|
||||||
|
"winxp"* ) desc="Windows XP" ;;
|
||||||
|
"winvista"* ) desc="Windows Vista" ;;
|
||||||
|
"win2025"* ) desc="Windows Server 2025" ;;
|
||||||
|
"win2022"* ) desc="Windows Server 2022" ;;
|
||||||
|
"win2019"* ) desc="Windows Server 2019" ;;
|
||||||
|
"win2016"* ) desc="Windows Server 2016" ;;
|
||||||
|
"win2012"* ) desc="Windows Server 2012" ;;
|
||||||
|
"win2008"* ) desc="Windows Server 2008" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
[[ "$id" == "win2025"* ]] && desc="Windows Server 2025"
|
if [ -z "$desc" ]; then
|
||||||
[[ "$id" == "win2022"* ]] && desc="Windows Server 2022"
|
desc="Windows"
|
||||||
[[ "$id" == "win2019"* ]] && desc="Windows Server 2019"
|
[[ "${PLATFORM,,}" != "x64" ]] && desc="$desc for ${PLATFORM}")
|
||||||
[[ "$id" == "win2016"* ]] && desc="Windows Server 2016"
|
fi
|
||||||
[[ "$id" == "win2012"* ]] && desc="Windows Server 2012"
|
|
||||||
[[ "$id" == "win2008"* ]] && desc="Windows Server 2008"
|
|
||||||
|
|
||||||
[[ "$id" == "tiny11"* ]] && desc="Tiny 11"
|
|
||||||
[[ "$id" == "tiny10"* ]] && desc="Tiny 10"
|
|
||||||
[[ "$id" == "core11"* ]] && desc="Core 11"
|
|
||||||
|
|
||||||
[ -z "$desc" ] && desc="Windows"
|
|
||||||
|
|
||||||
echo "$desc"
|
echo "$desc"
|
||||||
return 0
|
return 0
|
||||||
|
|
@ -119,57 +124,43 @@ printVersion() {
|
||||||
|
|
||||||
getName() {
|
getName() {
|
||||||
|
|
||||||
local file="$1"
|
local id=""
|
||||||
local desc="$2"
|
local desc="$1"
|
||||||
|
local file="${1,,}"
|
||||||
|
|
||||||
[[ "${file,,}" == "win11"* ]] && desc="Windows 11"
|
case "${file/ /_}" in
|
||||||
[[ "${file,,}" == "win10"* ]] && desc="Windows 10"
|
"win7"* | "win_7"* | *"windows7"* | *"windows_7"* )
|
||||||
[[ "${file,,}" == "win8"* ]] && desc="Windows 8"
|
id="win7${PLATFORM,,}"
|
||||||
[[ "${file,,}" == "win7"* ]] && desc="Windows 7"
|
;;
|
||||||
[[ "${file,,}" == "winxp"* ]] && desc="Windows XP"
|
"win8"* | "win_8"* | *"windows8"* | *"windows_8"* )
|
||||||
[[ "${file,,}" == "winvista"* ]] && desc="Windows Vista"
|
id="win81${PLATFORM,,}"
|
||||||
[[ "${file,,}" == "tiny10"* ]] && desc="Tiny 10"
|
;;
|
||||||
[[ "${file,,}" == "tiny11"* ]] && desc="Tiny 11"
|
"win10"*| "win_10"* | *"windows10"* | *"windows_10"* )
|
||||||
[[ "${file,,}" == "tiny11core"* ]] && desc="Tiny 11 Core"
|
id="win10${PLATFORM,,}"
|
||||||
[[ "${file,,}" == "tiny11_core"* ]] && desc="Tiny 11 Core"
|
;;
|
||||||
[[ "${file,,}" == *"windows11"* ]] && desc="Windows 11"
|
"win11"* | "win_11"* *"windows11"* | *"windows_11"* )
|
||||||
[[ "${file,,}" == *"windows10"* ]] && desc="Windows 10"
|
id="win11${PLATFORM,,}"
|
||||||
[[ "${file,,}" == *"windows8"* ]] && desc="Windows 8"
|
;;
|
||||||
[[ "${file,,}" == *"windows7"* ]] && desc="Windows 7"
|
*"winxp"* | *"win_xp"* | *"windowsxp"* | *"windows_xp"* )
|
||||||
[[ "${file,,}" == *"windowsxp"* ]] && desc="Windows XP"
|
id="winxpx86"
|
||||||
[[ "${file,,}" == *"windowsvista"* ]] && desc="Windows Vista"
|
;;
|
||||||
[[ "${file,,}" == *"windows_11"* ]] && desc="Windows 11"
|
*"winvista"* | *"win_vista"* | *"windowsvista"* | *"windows_vista"* )
|
||||||
[[ "${file,,}" == *"windows_10"* ]] && desc="Windows 10"
|
id="winvista${PLATFORM,,}"
|
||||||
[[ "${file,,}" == *"windows_8"* ]] && desc="Windows 8"
|
;;
|
||||||
[[ "${file,,}" == *"windows_7"* ]] && desc="Windows 7"
|
"tiny11core"* | "tiny11_core"* | "tiny_11_core"* ) id="core11" ;;
|
||||||
[[ "${file,,}" == *"windows_xp"* ]] && desc="Windows XP"
|
"tiny11"* | "tiny_11"* ) id="tiny11" ;;
|
||||||
[[ "${file,,}" == *"windows_vista"* ]] && desc="Windows Vista"
|
"tiny10"* | "tiny_10"* ) id="tiny10" ;;
|
||||||
[[ "${file,,}" == *"windows 11"* ]] && desc="Windows 11"
|
*"server2025"* | *"server_2025"* ) id="win2025" ;;
|
||||||
[[ "${file,,}" == *"windows 10"* ]] && desc="Windows 10"
|
*"server2022"* | *"server_2022"* ) id="win2022" ;;
|
||||||
[[ "${file,,}" == *"windows 8"* ]] && desc="Windows 8"
|
*"server2019"* | *"server_2019"* ) id="win2019" ;;
|
||||||
[[ "${file,,}" == *"windows 7"* ]] && desc="Windows 7"
|
*"server2016"* | *"server_2016"* ) id="win2016" ;;
|
||||||
[[ "${file,,}" == *"windows xp"* ]] && desc="Windows XP"
|
*"server2012"* | *"server_2012"* ) id="win2012r2" ;;
|
||||||
[[ "${file,,}" == *"windows vista"* ]] && desc="Windows Vista"
|
*"server2008"* | *"server_2008"* ) id="win2008r2" ;;
|
||||||
[[ "${file,,}" == *"server2008"* ]] && desc="Windows Server 2008"
|
esac
|
||||||
[[ "${file,,}" == *"server2012"* ]] && desc="Windows Server 2012"
|
|
||||||
[[ "${file,,}" == *"server2016"* ]] && desc="Windows Server 2016"
|
|
||||||
[[ "${file,,}" == *"server2019"* ]] && desc="Windows Server 2019"
|
|
||||||
[[ "${file,,}" == *"server2022"* ]] && desc="Windows Server 2022"
|
|
||||||
[[ "${file,,}" == *"server2025"* ]] && desc="Windows Server 2025"
|
|
||||||
[[ "${file,,}" == *"server_2008"* ]] && desc="Windows Server 2008"
|
|
||||||
[[ "${file,,}" == *"server_2012"* ]] && desc="Windows Server 2012"
|
|
||||||
[[ "${file,,}" == *"server_2016"* ]] && desc="Windows Server 2016"
|
|
||||||
[[ "${file,,}" == *"server_2019"* ]] && desc="Windows Server 2019"
|
|
||||||
[[ "${file,,}" == *"server_2022"* ]] && desc="Windows Server 2022"
|
|
||||||
[[ "${file,,}" == *"server_2025"* ]] && desc="Windows Server 2025"
|
|
||||||
[[ "${file,,}" == *"server 2008"* ]] && desc="Windows Server 2008"
|
|
||||||
[[ "${file,,}" == *"server 2012"* ]] && desc="Windows Server 2012"
|
|
||||||
[[ "${file,,}" == *"server 2016"* ]] && desc="Windows Server 2016"
|
|
||||||
[[ "${file,,}" == *"server 2019"* ]] && desc="Windows Server 2019"
|
|
||||||
[[ "${file,,}" == *"server 2022"* ]] && desc="Windows Server 2022"
|
|
||||||
[[ "${file,,}" == *"server 2025"* ]] && desc="Windows Server 2025"
|
|
||||||
|
|
||||||
[ -z "$desc" ] && desc="Windows"
|
if [ -n "$id" ]; then
|
||||||
|
desc=$(printVersion "$id" "$desc")
|
||||||
|
fi
|
||||||
|
|
||||||
echo "$desc"
|
echo "$desc"
|
||||||
return 0
|
return 0
|
||||||
|
|
@ -177,78 +168,64 @@ getName() {
|
||||||
|
|
||||||
getVersion() {
|
getVersion() {
|
||||||
|
|
||||||
|
local id=""
|
||||||
local name="$1"
|
local name="$1"
|
||||||
local detected=""
|
|
||||||
|
|
||||||
if [[ "${name,,}" == *"windows 7"* ]]; then
|
case "${name,,}" in
|
||||||
detected="win7${PLATFORM,,}"
|
*"server 2025"* ) id="win2025" ;;
|
||||||
[[ "${name,,}" == *"ultimate"* ]] && detected="win7${PLATFORM,,}-ultimate"
|
*"server 2022"* ) id="win2022" ;;
|
||||||
[[ "${name,,}" == *"enterprise"* ]] && detected="win7${PLATFORM,,}-enterprise"
|
*"server 2019"* ) id="win2019" ;;
|
||||||
fi
|
*"server 2016"* ) id="win2016" ;;
|
||||||
|
*"server 2012"* ) id="win2012r2" ;;
|
||||||
|
*"server 2008"* ) id="win2008r2" ;;
|
||||||
|
*"windows 7"* ) id="win7${PLATFORM,,}" ;;
|
||||||
|
*"windows 8"* ) id="win81${PLATFORM,,}" ;;
|
||||||
|
*"windows 10"* ) id="win10${PLATFORM,,}" ;;
|
||||||
|
*"windows 11"* ) id="win11${PLATFORM,,}" ;;
|
||||||
|
*"windows vista"* ) id="winvista${PLATFORM,,}" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [[ "${name,,}" == *"windows vista"* ]]; then
|
case "${id,,}" in
|
||||||
detected="winvista${PLATFORM,,}"
|
"win7"* | "winvista"* )
|
||||||
[[ "${name,,}" == *"ultimate"* ]] && detected="winvista${PLATFORM,,}-ultimate"
|
case "${name,,}" in
|
||||||
[[ "${name,,}" == *"enterprise"* ]] && detected="winvista${PLATFORM,,}-enterprise"
|
*" home"* ) id="$id-home" ;;
|
||||||
fi
|
*" starter"* ) id="$id-starter" ;;
|
||||||
|
*" ultimate"* ) id="$id-ultimate" ;;
|
||||||
|
*" enterprise"* ) id="$id-enterprise" ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"win8"* )
|
||||||
|
case "${name,,}" in
|
||||||
|
*" enterprise evaluation"* ) id="$id-enterprise-eval" ;;
|
||||||
|
*" enterprise"* ) id="$id-enterprise" ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"win10"* )
|
||||||
|
case "${name,,}" in
|
||||||
|
*" iot"* ) id="$id-iot" ;;
|
||||||
|
*" ltsc"* ) id="$id-ltsc" ;;
|
||||||
|
*" home"* ) id="$id-home" ;;
|
||||||
|
*" education"* ) id="$id-education" ;;
|
||||||
|
*" enterprise evaluation"* ) id="$id-enterprise-eval" ;;
|
||||||
|
*" enterprise"* ) id="$id-enterprise" ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"win11"* )
|
||||||
|
case "${name,,}" in
|
||||||
|
*" home"* ) id="$id-home" ;;
|
||||||
|
*" education"* ) id="$id-education" ;;
|
||||||
|
*" enterprise evaluation"* ) id="$id-enterprise-eval" ;;
|
||||||
|
*" enterprise"* ) id="$id-enterprise" ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
"win2025"* | "win2022"* | "win2019"* | "win2016"* | "win2012"* | "win2008"* )
|
||||||
|
case "${name,,}" in
|
||||||
|
*" evaluation"* ) id="$id-eval" ;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [[ "${name,,}" == *"server 2025"* ]]; then
|
echo "$id"
|
||||||
detected="win2025"
|
|
||||||
[[ "${name,,}" == *"evaluation"* ]] && detected="win2025-eval"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${name,,}" == *"server 2022"* ]]; then
|
|
||||||
detected="win2022"
|
|
||||||
[[ "${name,,}" == *"evaluation"* ]] && detected="win2022-eval"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${name,,}" == *"server 2019"* ]]; then
|
|
||||||
detected="win2019"
|
|
||||||
[[ "${name,,}" == *"evaluation"* ]] && detected="win2019-eval"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${name,,}" == *"server 2016"* ]]; then
|
|
||||||
detected="win2016"
|
|
||||||
[[ "${name,,}" == *"evaluation"* ]] && detected="win2016-eval"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${name,,}" == *"server 2012"* ]]; then
|
|
||||||
detected="win2012r2"
|
|
||||||
[[ "${name,,}" == *"evaluation"* ]] && detected="win2012r2-eval"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${name,,}" == *"server 2008"* ]]; then
|
|
||||||
detected="win2008r2"
|
|
||||||
[[ "${name,,}" == *"evaluation"* ]] && detected="win2008r2-eval"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${name,,}" == *"windows 8"* ]]; then
|
|
||||||
detected="win81${PLATFORM,,}"
|
|
||||||
[[ "${name,,}" == *"enterprise"* ]] && detected="win81${PLATFORM,,}-enterprise"
|
|
||||||
[[ "${name,,}" == *"enterprise evaluation"* ]] && detected="win81${PLATFORM,,}-enterprise-eval"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${name,,}" == *"windows 11"* ]]; then
|
|
||||||
detected="win11${PLATFORM,,}"
|
|
||||||
[[ "${name,,}" == *"enterprise"* ]] && detected="win11${PLATFORM,,}-enterprise"
|
|
||||||
[[ "${name,,}" == *"enterprise evaluation"* ]] && detected="win11${PLATFORM,,}-enterprise-eval"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${name,,}" == *"windows 10"* ]]; then
|
|
||||||
detected="win10${PLATFORM,,}"
|
|
||||||
if [[ "${name,,}" == *" iot "* ]]; then
|
|
||||||
detected="win10${PLATFORM,,}-iot"
|
|
||||||
else
|
|
||||||
if [[ "${name,,}" == *"ltsc"* ]]; then
|
|
||||||
detected="win10${PLATFORM,,}-ltsc"
|
|
||||||
else
|
|
||||||
[[ "${name,,}" == *"enterprise"* ]] && detected="win10${PLATFORM,,}-enterprise"
|
|
||||||
[[ "${name,,}" == *"enterprise evaluation"* ]] && detected="win10${PLATFORM,,}-enterprise-eval"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$detected"
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -266,21 +243,11 @@ switchEdition() {
|
||||||
"win81${PLATFORM,,}-enterprise-eval" )
|
"win81${PLATFORM,,}-enterprise-eval" )
|
||||||
DETECTED="win81${PLATFORM,,}-enterprise"
|
DETECTED="win81${PLATFORM,,}-enterprise"
|
||||||
;;
|
;;
|
||||||
"win2022-eval")
|
"win2022-eval" ) DETECTED="win2022" ;;
|
||||||
DETECTED="win2022"
|
"win2019-eval" ) DETECTED="win2019" ;;
|
||||||
;;
|
"win2016-eval" ) DETECTED="win2016" ;;
|
||||||
"win2019-eval")
|
"win2012r2-eval" ) DETECTED="win2012r2" ;;
|
||||||
DETECTED="win2019"
|
"win2008r2-eval" ) DETECTED="win2008r2" ;;
|
||||||
;;
|
|
||||||
"win2016-eval")
|
|
||||||
DETECTED="win2016"
|
|
||||||
;;
|
|
||||||
"win2012r2-eval")
|
|
||||||
DETECTED="win2012r2"
|
|
||||||
;;
|
|
||||||
"win2008r2-eval")
|
|
||||||
DETECTED="win2008r2"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
@ -291,12 +258,8 @@ isESD() {
|
||||||
local id="$1"
|
local id="$1"
|
||||||
|
|
||||||
case "${id,,}" in
|
case "${id,,}" in
|
||||||
"win11${PLATFORM,,}")
|
"win11${PLATFORM,,}" ) return 0 ;;
|
||||||
return 0
|
"win10${PLATFORM,,}" ) return 0 ;;
|
||||||
;;
|
|
||||||
"win10${PLATFORM,,}")
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
@ -366,7 +329,10 @@ getLink1() {
|
||||||
"win7${PLATFORM,,}" | "win7${PLATFORM,,}-enterprise" )
|
"win7${PLATFORM,,}" | "win7${PLATFORM,,}-enterprise" )
|
||||||
url="$host/7/en_windows_7_enterprise_with_sp1_${PLATFORM,,}_dvd_u_677651.iso"
|
url="$host/7/en_windows_7_enterprise_with_sp1_${PLATFORM,,}_dvd_u_677651.iso"
|
||||||
;;
|
;;
|
||||||
"winvista${PLATFORM,,}" | "winvista${PLATFORM,,}-ultimate")
|
"win7${PLATFORM,,}-ultimate" )
|
||||||
|
url="$host/7/en_windows_7_with_sp1_${PLATFORM,,}.iso"
|
||||||
|
;;
|
||||||
|
"winvista${PLATFORM,,}-ultimate" )
|
||||||
url="$host/vista/en_windows_vista_sp2_${PLATFORM,,}_dvd_342267.iso"
|
url="$host/vista/en_windows_vista_sp2_${PLATFORM,,}_dvd_342267.iso"
|
||||||
;;
|
;;
|
||||||
"winxpx86" )
|
"winxpx86" )
|
||||||
|
|
@ -403,7 +369,13 @@ getLink2() {
|
||||||
"win7${PLATFORM,,}" | "win7${PLATFORM,,}-enterprise" )
|
"win7${PLATFORM,,}" | "win7${PLATFORM,,}-enterprise" )
|
||||||
url="$host/Windows%207/en_windows_7_enterprise_with_sp1_${PLATFORM,,}_dvd_u_677651.iso"
|
url="$host/Windows%207/en_windows_7_enterprise_with_sp1_${PLATFORM,,}_dvd_u_677651.iso"
|
||||||
;;
|
;;
|
||||||
"winvista${PLATFORM,,}" | "winvista${PLATFORM,,}-ultimate")
|
"win7${PLATFORM,,}-ultimate" )
|
||||||
|
url="$host/Windows%207/en_windows_7_ultimate_with_sp1_${PLATFORM,,}_dvd_u_677332.iso"
|
||||||
|
;;
|
||||||
|
"winvista${PLATFORM,,}" | "winvista${PLATFORM,,}-enterprise" )
|
||||||
|
url="$host/Windows%20Vista/en_windows_vista_enterprise_sp2_${PLATFORM,,}_dvd_342332.iso"
|
||||||
|
;;
|
||||||
|
"winvista${PLATFORM,,}-ultimate" )
|
||||||
url="$host/Windows%20Vista/en_windows_vista_sp2_${PLATFORM,,}_dvd_342267.iso"
|
url="$host/Windows%20Vista/en_windows_vista_sp2_${PLATFORM,,}_dvd_342267.iso"
|
||||||
;;
|
;;
|
||||||
"winxpx86" )
|
"winxpx86" )
|
||||||
|
|
@ -425,15 +397,9 @@ getLink3() {
|
||||||
local host="https://file.cnxiaobai.com/Windows"
|
local host="https://file.cnxiaobai.com/Windows"
|
||||||
|
|
||||||
case "${id,,}" in
|
case "${id,,}" in
|
||||||
"core11")
|
"core11" ) url="$host/%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85%E5%8C%85/Tiny%2010_11/tiny11%20core%20${PLATFORM,,}%20beta%201.iso" ;;
|
||||||
url="$host/%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85%E5%8C%85/Tiny%2010_11/tiny11%20core%20${PLATFORM,,}%20beta%201.iso"
|
"tiny11" ) url="$host/%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85%E5%8C%85/Tiny%2010_11/tiny11%202311%20${PLATFORM,,}.iso" ;;
|
||||||
;;
|
"tiny10" ) url="$host/%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85%E5%8C%85/Tiny%2010_11/tiny10%2023H2%20${PLATFORM,,}.iso" ;;
|
||||||
"tiny11")
|
|
||||||
url="$host/%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85%E5%8C%85/Tiny%2010_11/tiny11%202311%20${PLATFORM,,}.iso"
|
|
||||||
;;
|
|
||||||
"tiny10")
|
|
||||||
url="$host/%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85%E5%8C%85/Tiny%2010_11/tiny10%2023H2%20${PLATFORM,,}.iso"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo "$url"
|
echo "$url"
|
||||||
|
|
@ -447,15 +413,9 @@ getLink4() {
|
||||||
local host="https://archive.org/download"
|
local host="https://archive.org/download"
|
||||||
|
|
||||||
case "${id,,}" in
|
case "${id,,}" in
|
||||||
"core11")
|
"core11" ) url="$host/tiny-11-core-x-64-beta-1/tiny11%20core%20${PLATFORM,,}%20beta%201.iso" ;;
|
||||||
url="$host/tiny-11-core-x-64-beta-1/tiny11%20core%20${PLATFORM,,}%20beta%201.iso"
|
"tiny11" ) url="$host/tiny11-2311/tiny11%202311%20${PLATFORM,,}.iso" ;;
|
||||||
;;
|
"tiny10" ) url="$host/tiny-10-23-h2/tiny10%20${PLATFORM,,}%2023h2.iso" ;;
|
||||||
"tiny11")
|
|
||||||
url="$host/tiny11-2311/tiny11%202311%20${PLATFORM,,}.iso"
|
|
||||||
;;
|
|
||||||
"tiny10")
|
|
||||||
url="$host/tiny-10-23-h2/tiny10%20${PLATFORM,,}%2023h2.iso"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo "$url"
|
echo "$url"
|
||||||
|
|
@ -513,7 +473,13 @@ getLink5() {
|
||||||
"win7${PLATFORM,,}" | "win7${PLATFORM,,}-enterprise" )
|
"win7${PLATFORM,,}" | "win7${PLATFORM,,}-enterprise" )
|
||||||
url="$host/en_windows_7_enterprise_with_sp1_${PLATFORM,,}_dvd_u_677651.iso"
|
url="$host/en_windows_7_enterprise_with_sp1_${PLATFORM,,}_dvd_u_677651.iso"
|
||||||
;;
|
;;
|
||||||
"winvista${PLATFORM,,}" | "winvista${PLATFORM,,}-ultimate")
|
"win7${PLATFORM,,}-ultimate" )
|
||||||
|
url="$host/en_windows_7_ultimate_with_sp1_${PLATFORM,,}_dvd_u_677332.iso"
|
||||||
|
;;
|
||||||
|
"winvista${PLATFORM,,}" | "winvista${PLATFORM,,}-enterprise" )
|
||||||
|
url="$host/en_windows_vista_enterprise_sp2_${PLATFORM,,}_dvd_342332.iso"
|
||||||
|
;;
|
||||||
|
"winvista${PLATFORM,,}-ultimate" )
|
||||||
url="$host/en_windows_vista_sp2_${PLATFORM,,}_dvd_342267.iso"
|
url="$host/en_windows_vista_sp2_${PLATFORM,,}_dvd_342267.iso"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
@ -525,26 +491,12 @@ getLink5() {
|
||||||
getLink() {
|
getLink() {
|
||||||
|
|
||||||
local url=""
|
local url=""
|
||||||
local index="$1"
|
|
||||||
local id="$2"
|
local id="$2"
|
||||||
|
local func="getLink$1"
|
||||||
|
|
||||||
case "${index,,}" in
|
if [ "$1" -gt 0 ] && [ "$1" -le "$MIRRORS" ]; then
|
||||||
"1")
|
url=$($func "$id")
|
||||||
url=$(getLink1 "$id")
|
fi
|
||||||
;;
|
|
||||||
"2")
|
|
||||||
url=$(getLink2 "$id")
|
|
||||||
;;
|
|
||||||
"3")
|
|
||||||
url=$(getLink3 "$id")
|
|
||||||
;;
|
|
||||||
"4")
|
|
||||||
url=$(getLink4 "$id")
|
|
||||||
;;
|
|
||||||
"5")
|
|
||||||
url=$(getLink5 "$id")
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo "$url"
|
echo "$url"
|
||||||
return 0
|
return 0
|
||||||
|
|
@ -558,7 +510,7 @@ validVersion() {
|
||||||
isESD "$id" && return 0
|
isESD "$id" && return 0
|
||||||
isMido "$id" && return 0
|
isMido "$id" && return 0
|
||||||
|
|
||||||
for i in {1..9}
|
for i in {1..MIRRORS}
|
||||||
do
|
do
|
||||||
|
|
||||||
url=$(getLink "$i" "$id")
|
url=$(getLink "$i" "$id")
|
||||||
|
|
@ -661,10 +613,12 @@ configXP() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${arch,,}" == "x86" ]]; then
|
if [[ "${arch,,}" == "x86" ]]; then
|
||||||
# Windows XP Pro x86 generic key (no activation)
|
# Windows XP Professional x86 generic key (no activation, trial-only)
|
||||||
|
# This is not a pirated key, it comes from the official MS documentation.
|
||||||
key="DR8GV-C8V6J-BYXHG-7PYJR-DB66Y"
|
key="DR8GV-C8V6J-BYXHG-7PYJR-DB66Y"
|
||||||
else
|
else
|
||||||
# Windows XP Pro x64 generic key (no activation)
|
# Windows XP Professional x64 generic key (no activation, trial-only)
|
||||||
|
# This is not a pirated key, it comes from the official MS documentation.
|
||||||
key="B2RBK-7KPT9-4JP6X-QQFWM-PJD6G"
|
key="B2RBK-7KPT9-4JP6X-QQFWM-PJD6G"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue