mirror of
https://github.com/dockur/windows.git
synced 2024-11-15 01:34:41 +00:00
fix: Custom URL parsing (#528)
This commit is contained in:
parent
98204e54ef
commit
b1f10aa546
@ -1,5 +1,5 @@
|
|||||||
FROM scratch
|
FROM scratch
|
||||||
COPY --from=qemux/qemu-docker:5.05 / /
|
COPY --from=qemux/qemu-docker:5.06 / /
|
||||||
|
|
||||||
ARG VERSION_ARG="0.0"
|
ARG VERSION_ARG="0.0"
|
||||||
ARG DEBCONF_NOWARNINGS="yes"
|
ARG DEBCONF_NOWARNINGS="yes"
|
||||||
|
@ -17,8 +17,6 @@ PLATFORM="x64"
|
|||||||
|
|
||||||
parseVersion() {
|
parseVersion() {
|
||||||
|
|
||||||
VERSION="${VERSION/\//}"
|
|
||||||
|
|
||||||
if [[ "${VERSION}" == \"*\" || "${VERSION}" == \'*\' ]]; then
|
if [[ "${VERSION}" == \"*\" || "${VERSION}" == \'*\' ]]; then
|
||||||
VERSION="${VERSION:1:-1}"
|
VERSION="${VERSION:1:-1}"
|
||||||
fi
|
fi
|
||||||
@ -295,9 +293,9 @@ getLanguage() {
|
|||||||
|
|
||||||
parseLanguage() {
|
parseLanguage() {
|
||||||
|
|
||||||
REGION="${REGION/_/-/}"
|
REGION="${REGION//_/-/}"
|
||||||
KEYBOARD="${KEYBOARD/_/-/}"
|
KEYBOARD="${KEYBOARD//_/-/}"
|
||||||
LANGUAGE="${LANGUAGE/_/-/}"
|
LANGUAGE="${LANGUAGE//_/-/}"
|
||||||
|
|
||||||
[ -z "$LANGUAGE" ] && LANGUAGE="en"
|
[ -z "$LANGUAGE" ] && LANGUAGE="en"
|
||||||
|
|
||||||
@ -443,7 +441,7 @@ fromFile() {
|
|||||||
local file="${1,,}"
|
local file="${1,,}"
|
||||||
local arch="${PLATFORM,,}"
|
local arch="${PLATFORM,,}"
|
||||||
|
|
||||||
case "${file/ /_}" in
|
case "${file// /_}" in
|
||||||
*"_x64_"* | *"_x64."*)
|
*"_x64_"* | *"_x64."*)
|
||||||
arch="x64"
|
arch="x64"
|
||||||
;;
|
;;
|
||||||
@ -455,7 +453,7 @@ fromFile() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "${file/ /_}" in
|
case "${file// /_}" in
|
||||||
"win7"* | "win_7"* | *"windows7"* | *"windows_7"* )
|
"win7"* | "win_7"* | *"windows7"* | *"windows_7"* )
|
||||||
id="win7${arch}"
|
id="win7${arch}"
|
||||||
;;
|
;;
|
||||||
|
@ -24,7 +24,6 @@ cd /run
|
|||||||
trap - ERR
|
trap - ERR
|
||||||
|
|
||||||
info "Booting ${APP}${BOOT_DESC}..."
|
info "Booting ${APP}${BOOT_DESC}..."
|
||||||
[[ "$DEBUG" == [Yy1]* ]] && echo "Arguments: $ARGS" && echo
|
|
||||||
|
|
||||||
{ qemu-system-x86_64 ${ARGS:+ $ARGS} >"$QEMU_OUT" 2>"$QEMU_LOG"; rc=$?; } || :
|
{ qemu-system-x86_64 ${ARGS:+ $ARGS} >"$QEMU_OUT" 2>"$QEMU_LOG"; rc=$?; } || :
|
||||||
(( rc != 0 )) && error "$(<"$QEMU_LOG")" && exit 15
|
(( rc != 0 )) && error "$(<"$QEMU_LOG")" && exit 15
|
||||||
|
@ -65,7 +65,7 @@ startInstall() {
|
|||||||
|
|
||||||
if [ -z "$CUSTOM" ]; then
|
if [ -z "$CUSTOM" ]; then
|
||||||
|
|
||||||
local file="${VERSION/\//}.iso"
|
local file="${VERSION//\//}.iso"
|
||||||
|
|
||||||
if [[ "${VERSION,,}" == "http"* ]]; then
|
if [[ "${VERSION,,}" == "http"* ]]; then
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ startInstall() {
|
|||||||
language="${language%%-*}"
|
language="${language%%-*}"
|
||||||
|
|
||||||
if [ -n "$language" ] && [[ "${language,,}" != "en" ]]; then
|
if [ -n "$language" ] && [[ "${language,,}" != "en" ]]; then
|
||||||
file="${VERSION/\//}_${language,,}.iso"
|
file="${VERSION//\//}_${language,,}.iso"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@ -675,8 +675,8 @@ updateImage() {
|
|||||||
local asset="$2"
|
local asset="$2"
|
||||||
local language="$3"
|
local language="$3"
|
||||||
local file="autounattend.xml"
|
local file="autounattend.xml"
|
||||||
local org="${file/.xml/.org}"
|
local org="${file//.xml/.org}"
|
||||||
local dat="${file/.xml/.dat}"
|
local dat="${file//.xml/.dat}"
|
||||||
local desc path src loc xml index result
|
local desc path src loc xml index result
|
||||||
|
|
||||||
[[ "${DETECTED,,}" == "winxp"* ]] && return 0
|
[[ "${DETECTED,,}" == "winxp"* ]] && return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user