Hyprland-dotfiles/.install/confirm-start.sh

38 lines
1.1 KiB
Bash
Raw Normal View History

2023-11-10 21:12:15 +00:00
# ------------------------------------------------------
# Confirm Start
# ------------------------------------------------------
SCRIPT=$(realpath "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
if [ $SCRIPTPATH = "/home/$USER/dotfiles" ]; then
2023-12-25 14:45:11 +01:00
echo ""
2023-11-10 21:12:15 +00:00
echo "IMPORTANT: You're running the installation script from the installation target directory."
echo "Please move the installation folder dotfiles e.g. to ~/Downloads/ and start the script again."
echo "Proceeding is not recommended!"
if [ ! $mode == "dev" ]; then
exit
fi
fi
2023-12-21 21:57:44 +01:00
if [ ! -d ~/dotfiles ];then
2024-03-19 16:58:35 +01:00
if gum confirm "DO YOU WANT TO START THE INSTALLATION OF THE ML4W DOTFILES NOW?" ;then
2023-12-21 21:57:44 +01:00
echo "Installation started."
elif [ $? -eq 130 ]; then
2024-05-27 13:39:44 +02:00
echo ":: Installation canceled."
exit 130
2023-12-21 21:57:44 +01:00
else
2024-03-19 16:58:35 +01:00
echo ":: Installation canceled."
2023-12-21 21:57:44 +01:00
exit;
fi
2023-11-20 22:11:39 +01:00
else
2024-03-19 16:58:35 +01:00
if gum confirm "DO YOU WANT TO START THE UPDATE OF YOUR ML4W DOTFILES NOW?" ;then
echo ":: Update started."
2023-12-21 21:57:44 +01:00
elif [ $? -eq 130 ]; then
2024-05-27 13:39:44 +02:00
echo ":: Update canceled."
exit 130
2023-12-21 21:57:44 +01:00
else
2024-03-19 16:58:35 +01:00
echo ":: Update canceled."
2023-12-21 21:57:44 +01:00
exit;
fi
2023-11-20 22:11:39 +01:00
fi
2023-11-10 21:12:15 +00:00
echo ""