2023-11-10 21:12:15 +00:00
|
|
|
# ------------------------------------------------------
|
|
|
|
# Confirm Start
|
|
|
|
# ------------------------------------------------------
|
|
|
|
|
2023-12-21 20:57:44 +00:00
|
|
|
echo "IMPORTANT: Please make sure that your system and your packages are up to date (sudo pacman -Syu or yay)."
|
2023-12-25 13:45:11 +00:00
|
|
|
echo "You can cancel the installation at any time with CTRL + C"
|
2023-12-14 19:32:08 +00:00
|
|
|
echo "If you have already installed a window manager like sway, please backup your .config folder."
|
2023-11-10 21:12:15 +00:00
|
|
|
SCRIPT=$(realpath "$0")
|
|
|
|
SCRIPTPATH=$(dirname "$SCRIPT")
|
|
|
|
if [ $SCRIPTPATH = "/home/$USER/dotfiles" ]; then
|
2023-12-25 13:45:11 +00: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 20:57:44 +00:00
|
|
|
if [ ! -d ~/dotfiles ];then
|
|
|
|
if gum confirm "DO YOU WANT TO START THE INSTALLATION NOW?" ;then
|
|
|
|
echo "Installation started."
|
|
|
|
elif [ $? -eq 130 ]; then
|
|
|
|
exit 130
|
|
|
|
else
|
|
|
|
echo "Installation canceled."
|
|
|
|
exit;
|
|
|
|
fi
|
2023-11-20 21:11:39 +00:00
|
|
|
else
|
2023-12-21 20:57:44 +00:00
|
|
|
if gum confirm "DO YOU WANT TO START THE UPDATE NOW?" ;then
|
|
|
|
echo "Update started."
|
|
|
|
elif [ $? -eq 130 ]; then
|
|
|
|
exit 130
|
|
|
|
else
|
|
|
|
echo "Update canceled."
|
|
|
|
exit;
|
|
|
|
fi
|
2023-11-20 21:11:39 +00:00
|
|
|
fi
|
2023-11-10 21:12:15 +00:00
|
|
|
echo ""
|