mirror of
https://github.com/dockur/windows.git
synced 2025-04-22 08:32:53 +00:00
Update install.sh
This commit is contained in:
parent
608b364764
commit
a7174afaf5
@ -185,6 +185,7 @@ abortInstall() {
|
|||||||
local efi
|
local efi
|
||||||
|
|
||||||
[[ "${iso,,}" == *".esd" ]] && exit 60
|
[[ "${iso,,}" == *".esd" ]] && exit 60
|
||||||
|
[[ "${UNPACK:-}" == [Yy1]* ]] && exit 60
|
||||||
|
|
||||||
efi=$(find "$dir" -maxdepth 1 -type d -iname efi | head -n 1)
|
efi=$(find "$dir" -maxdepth 1 -type d -iname efi | head -n 1)
|
||||||
|
|
||||||
@ -336,7 +337,7 @@ extractImage() {
|
|||||||
local dir="$2"
|
local dir="$2"
|
||||||
local version="$3"
|
local version="$3"
|
||||||
local desc="local ISO"
|
local desc="local ISO"
|
||||||
local size size_gb space space_gb
|
local file size size_gb space space_gb
|
||||||
|
|
||||||
if [ -z "$CUSTOM" ]; then
|
if [ -z "$CUSTOM" ]; then
|
||||||
desc="downloaded ISO"
|
desc="downloaded ISO"
|
||||||
@ -375,8 +376,27 @@ extractImage() {
|
|||||||
error "Failed to extract ISO file: $iso" && return 1
|
error "Failed to extract ISO file: $iso" && return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "${UNPACK:-}" != [Yy1]* ]]; then
|
||||||
|
|
||||||
LABEL=$(isoinfo -d -i "$iso" | sed -n 's/Volume id: //p')
|
LABEL=$(isoinfo -d -i "$iso" | sed -n 's/Volume id: //p')
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
file=$(find "$dir" -maxdepth 1 -type f -iname "*.iso" | head -n 1)
|
||||||
|
|
||||||
|
if [ -z "$file" ]; then
|
||||||
|
error "Failed to find any .iso file in archive!" && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! 7z x "$file" -o"$dir" > /dev/null; then
|
||||||
|
error "Failed to extract archive!" && return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
LABEL=$(isoinfo -d -i "$file" | sed -n 's/Volume id: //p')
|
||||||
|
rm -f "$file"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user