ATSET THE RAINBOW
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
|
||||
# THE RAINBOW HAHAHAH
|
||||
RED='\e[31m'
|
||||
GREEN='\e[32m'
|
||||
YELLOW='\e[33m'
|
||||
RESET='\e[0m'
|
||||
|
||||
# root check
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "You must be root to do this." 1>&2
|
||||
echo -e "${RED}You must be root to do this." 1>&2
|
||||
exit 100
|
||||
fi
|
||||
|
||||
@@ -60,7 +67,7 @@ echo "Chose disk $disk_name"
|
||||
echo
|
||||
|
||||
if [[ $NO_WRITE == true ]]; then
|
||||
echo "--nowrite is specified no need for Img no disks will be written to"
|
||||
echo -e "${YELLOW}--nowrite is specified no need for Img no disks will be written to${RESET}"
|
||||
else
|
||||
read -rp "Enter the name of the usb partition in /dev/mapper (e.g., sda1): " disk_suffix
|
||||
|
||||
@@ -68,7 +75,7 @@ else
|
||||
|
||||
user_response="n"
|
||||
|
||||
read -rp "You are about to WRITE and ERASE disk ${disk_name} | Are you sure? y/N: " user_response
|
||||
read -rp "$(echo -e "${RED}You are about to WRITE and ERASE disk ${disk_name} | Are you sure? y/N: ${RESET}")" user_response
|
||||
|
||||
if [[ $user_response != y ]]; then
|
||||
echo "Exiting script"
|
||||
@@ -125,6 +132,6 @@ grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=debia
|
||||
update-grub
|
||||
"
|
||||
|
||||
echo "Restore and resize complete!"
|
||||
echo -e "${GREEN}Restore and resize complete!${RESET}"
|
||||
|
||||
cleanup
|
||||
|
||||
Reference in New Issue
Block a user