fix: robust ISO download detection, fix color escape codes in installer
- Use find instead of hardcoded filename for downloaded ISO detection (wget may save with redirect filename or partial name) - Fix color escape codes: use $'\033' syntax instead of '\033' for reliable ANSI color rendering in installer output Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5d8365f001
commit
74abbef00d
@ -431,13 +431,14 @@ if [ ! -f "$BASE_ISO" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Find the downloaded file (wget creates it with a name like "download" or the actual filename)
|
# Find the downloaded file — wget may use URL filename or follow redirects
|
||||||
if [ -f "download" ]; then
|
FOUND_ISO=$(find "$WORK_DIR" -maxdepth 1 -name "debian-live-12*.iso" -o -name "download" 2>/dev/null | head -1)
|
||||||
mv "download" "$BASE_ISO"
|
if [ -n "$FOUND_ISO" ] && [ -f "$FOUND_ISO" ]; then
|
||||||
elif [ -f "debian-live-12.10.0-${DEB_ARCH}-standard.iso" ]; then
|
mv "$FOUND_ISO" "$BASE_ISO"
|
||||||
mv "debian-live-12.10.0-${DEB_ARCH}-standard.iso" "$BASE_ISO"
|
|
||||||
else
|
else
|
||||||
echo " ❌ Downloaded file not found"
|
echo " ❌ Downloaded file not found in $WORK_DIR"
|
||||||
|
echo " Files present:"
|
||||||
|
ls -la "$WORK_DIR"/*.iso 2>/dev/null || echo " (no .iso files)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@ -974,12 +975,12 @@ case "$(uname -m)" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Colors
|
# Colors (use $'...' syntax for reliable escape code interpretation)
|
||||||
RED='\033[0;31m'
|
RED=$'\033[0;31m'
|
||||||
GREEN='\033[0;32m'
|
GREEN=$'\033[0;32m'
|
||||||
YELLOW='\033[1;33m'
|
YELLOW=$'\033[1;33m'
|
||||||
BLUE='\033[0;34m'
|
BLUE=$'\033[0;34m'
|
||||||
NC='\033[0m'
|
NC=$'\033[0m'
|
||||||
|
|
||||||
clear
|
clear
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user