Skip to content

Commit

Permalink
fix: Default to Win10
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored Jan 14, 2024
1 parent b038474 commit 4dfe6c6
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -Eeuo pipefail

: "${VERSION:="win11x64"}"
: "${VERSION:="win10x64"}"

BASE="$VERSION.iso"
[ -f "$STORAGE/$BASE" ] && return 0
Expand All @@ -13,15 +13,14 @@ else
PROGRESS="--progress=dot:giga"
fi

URL="https://raw.githubusercontent.com/ElliotKillick/Mido/main/Mido.sh"
{ wget "$URL" -O "$STORAGE/Mido.sh" -q --no-check-certificate; rc=$?; } || :
SCRIPT="$STORAGE/mido.sh"

(( rc != 0 )) && error "Failed to download $URL, reason: $rc" && exit 65
rm -f "$SCRIPT"
cp /run/mido.sh "$SCRIPT"
chmod +x "$SCRIPT"

chmod +x "$STORAGE/Mido.sh"
rm -f "$STORAGE/$BASE"

bash "$STORAGE/Mido.sh" "$VERSION"
bash "$SCRIPT" "$VERSION"
rm -f "$SCRIPT"

[ ! -f "$STORAGE/$BASE" ] && error "Failed to download $VERSION.iso!" && exit 66

Expand Down

0 comments on commit 4dfe6c6

Please sign in to comment.