Add warnings to hardware script (dd implies 'doubly dangerous')

This commit is contained in:
2025-02-25 02:55:52 +00:00
parent 375c5aa561
commit 177fddcf7d
+23 -1
View File
@@ -1,2 +1,24 @@
#!/bin/bash #!/bin/bash
sudo dd if=./build/image.iso of="$1"
# Colors
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
RED='\033[0;31m'
BOLD='\033[1m'
NC='\033[0m' # No Color
info() {
echo -e "${BLUE}${BOLD}info${NC}: $1"
}
warning() {
echo -e "${YELLOW}${BOLD}warning${NC}: $1" >&2
}
warning "This script will OVERWRITE whatever media you throw at it\nwith the built ISO."
info "sudo ./hardware.sh /dev/yourdisk"
if echo "$1" | grep -q "/dev"; then
dd if=./build/image.iso of="$1"
fi