ATSET THE RAINBOW

This commit is contained in:
poslop
2025-07-31 16:39:59 -05:00
parent 724d746aa0
commit 5ffa71d87b

View File

@@ -1,9 +1,16 @@
#!/bin/bash #!/bin/bash
set -e set -e
# THE RAINBOW HAHAHAH
RED='\e[31m'
GREEN='\e[32m'
YELLOW='\e[33m'
RESET='\e[0m'
# root check # root check
if [[ $EUID -ne 0 ]]; then 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 exit 100
fi fi
@@ -60,7 +67,7 @@ echo "Chose disk $disk_name"
echo echo
if [[ $NO_WRITE == true ]]; then 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 else
read -rp "Enter the name of the usb partition in /dev/mapper (e.g., sda1): " disk_suffix 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" 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 if [[ $user_response != y ]]; then
echo "Exiting script" echo "Exiting script"
@@ -125,6 +132,6 @@ grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=debia
update-grub update-grub
" "
echo "Restore and resize complete!" echo -e "${GREEN}Restore and resize complete!${RESET}"
cleanup cleanup