mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 19:35:49 +00:00
Update install.sh
This commit is contained in:
parent
15899d0453
commit
8792ea0489
1 changed files with 2 additions and 15 deletions
|
|
@ -185,8 +185,7 @@ abortInstall() {
|
||||||
|
|
||||||
startInstall() {
|
startInstall() {
|
||||||
|
|
||||||
local magic desc
|
html "Starting Windows..."
|
||||||
local msg="Windows is being started, please wait..."
|
|
||||||
|
|
||||||
if [ -f "$STORAGE/$CUSTOM" ]; then
|
if [ -f "$STORAGE/$CUSTOM" ]; then
|
||||||
|
|
||||||
|
|
@ -207,36 +206,24 @@ startInstall() {
|
||||||
|
|
||||||
BASE="$VERSION.iso"
|
BASE="$VERSION.iso"
|
||||||
|
|
||||||
if ! skipInstall && [ ! -f "$STORAGE/$BASE" ]; then
|
|
||||||
|
|
||||||
desc=$(printVersion "$VERSION")
|
|
||||||
[ -z "$desc" ] && desc="Windows"
|
|
||||||
msg="Downloading $desc..."
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
BASE=$(basename "${VERSION%%\?*}")
|
BASE=$(basename "${VERSION%%\?*}")
|
||||||
: "${BASE//+/ }"; printf -v BASE '%b' "${_//%/\\x}"
|
: "${BASE//+/ }"; printf -v BASE '%b' "${_//%/\\x}"
|
||||||
BASE=$(echo "$BASE" | sed -e 's/[^A-Za-z0-9._-]/_/g')
|
BASE=$(echo "$BASE" | sed -e 's/[^A-Za-z0-9._-]/_/g')
|
||||||
|
|
||||||
if ! skipInstall && [ ! -f "$STORAGE/$BASE" ]; then
|
|
||||||
msg="Downloading $BASE ..."
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ "${BASE,,}" == "custom."* ]] && BASE="windows.iso"
|
[[ "${BASE,,}" == "custom."* ]] && BASE="windows.iso"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
html "$msg"
|
|
||||||
|
|
||||||
[ -z "$MANUAL" ] && MANUAL="N"
|
[ -z "$MANUAL" ] && MANUAL="N"
|
||||||
|
|
||||||
if [ -f "$STORAGE/$BASE" ]; then
|
if [ -f "$STORAGE/$BASE" ]; then
|
||||||
|
|
||||||
# Check if the ISO was already processed by our script
|
# Check if the ISO was already processed by our script
|
||||||
|
local magic=""
|
||||||
magic=$(dd if="$STORAGE/$BASE" seek=0 bs=1 count=1 status=none | tr -d '\000')
|
magic=$(dd if="$STORAGE/$BASE" seek=0 bs=1 count=1 status=none | tr -d '\000')
|
||||||
magic="$(printf '%s' "$magic" | od -A n -t x1 -v | tr -d ' \n')"
|
magic="$(printf '%s' "$magic" | od -A n -t x1 -v | tr -d ' \n')"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue