2023-11-10 16:12:15 -05:00
|
|
|
# ------------------------------------------------------
|
|
|
|
# Confirm Start
|
|
|
|
# ------------------------------------------------------
|
|
|
|
|
|
|
|
SCRIPT=$(realpath "$0")
|
|
|
|
SCRIPTPATH=$(dirname "$SCRIPT")
|
|
|
|
if [ $SCRIPTPATH = "/home/$USER/dotfiles" ]; then
|
2023-12-25 08:45:11 -05:00
|
|
|
echo ""
|
2023-11-10 16:12:15 -05: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 15:57:44 -05:00
|
|
|
if [ ! -d ~/dotfiles ];then
|
2024-03-19 11:58:35 -04:00
|
|
|
if gum confirm "DO YOU WANT TO START THE INSTALLATION OF THE ML4W DOTFILES NOW?" ;then
|
2023-12-21 15:57:44 -05:00
|
|
|
echo "Installation started."
|
|
|
|
elif [ $? -eq 130 ]; then
|
|
|
|
exit 130
|
|
|
|
else
|
2024-03-19 11:58:35 -04:00
|
|
|
echo ":: Installation canceled."
|
2023-12-21 15:57:44 -05:00
|
|
|
exit;
|
|
|
|
fi
|
2023-11-20 16:11:39 -05:00
|
|
|
else
|
2024-03-19 11:58:35 -04:00
|
|
|
if gum confirm "DO YOU WANT TO START THE UPDATE OF YOUR ML4W DOTFILES NOW?" ;then
|
|
|
|
echo ":: Update started."
|
2023-12-21 15:57:44 -05:00
|
|
|
elif [ $? -eq 130 ]; then
|
|
|
|
exit 130
|
|
|
|
else
|
2024-03-19 11:58:35 -04:00
|
|
|
echo ":: Update canceled."
|
2023-12-21 15:57:44 -05:00
|
|
|
exit;
|
|
|
|
fi
|
2023-11-20 16:11:39 -05:00
|
|
|
fi
|
2023-11-10 16:12:15 -05:00
|
|
|
echo ""
|