mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 03:15:49 +00:00
Update install.sh
This commit is contained in:
parent
8dfc48ca41
commit
6fb9b0a491
1 changed files with 14 additions and 4 deletions
|
|
@ -70,20 +70,30 @@ fi
|
|||
[[ "${BASE,,}" == "custom."* ]] && BASE="target.iso"
|
||||
|
||||
html "$MSG"
|
||||
|
||||
CUSTOM="custom.iso"
|
||||
TMP="$STORAGE/tmp"
|
||||
|
||||
if [ -f "$STORAGE/$BASE" ]; then
|
||||
|
||||
# Check if the ISO was already processed by our script
|
||||
MAGIC=$(dd if="$STORAGE/$BASE" seek=0 bs=1 count=1 status=none)
|
||||
MAGIC="$(printf '%s' "$MAGIC" | od -A n -t x1 -v | tr -d ' \n')"
|
||||
|
||||
if [[ "${MAGIC,,}" == "16" ]]; then
|
||||
rm -rf "$TMP"
|
||||
return 0
|
||||
fi
|
||||
|
||||
info "ISO file "$STORAGE/$BASE" needs to be prepared..."
|
||||
|
||||
fi
|
||||
|
||||
mkdir -p "$TMP"
|
||||
|
||||
ISO="$TMP/$BASE"
|
||||
rm -f "$ISO"
|
||||
|
||||
CUSTOM="custom.iso"
|
||||
|
||||
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="custom.img"
|
||||
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="Custom.iso"
|
||||
[ ! -f "$STORAGE/$CUSTOM" ] && CUSTOM="Custom.img"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue