Add warnings to hardware script (dd implies 'doubly dangerous')
This commit is contained in:
+23
-1
@@ -1,2 +1,24 @@
|
||||
#!/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
|
||||
|
||||
Reference in New Issue
Block a user