2020-07-25 23:39:09 +00:00
|
|
|
#!/usr/bin/env bash
|
2020-01-08 15:55:09 +00:00
|
|
|
|
2021-07-14 16:10:23 +00:00
|
|
|
# If you're getting signature errors, check out https://www.msys2.org/news/#2020-06-29-new-packagers and/or other news posts.
|
2021-02-08 16:40:43 +00:00
|
|
|
|
2020-01-08 15:55:09 +00:00
|
|
|
source "$HOME/.dotfiles/script_helpers/printing.sh"
|
|
|
|
source "$HOME/.dotfiles/script_helpers/platform.sh"
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [[ -d "/c/msys64" ]]; then
|
|
|
|
shell_is_mingw is_mingw
|
|
|
|
if [[ $is_mingw -eq 1 ]]; then
|
2021-07-14 16:10:23 +00:00
|
|
|
printf "${BOLD}${YELLOW}Updating MinGW Shell${NORMAL}\n"
|
2020-01-08 15:55:09 +00:00
|
|
|
pacman -Syu
|
|
|
|
printf "${BOLD}${GREEN}Done!${NORMAL}\n"
|
2021-07-14 16:10:23 +00:00
|
|
|
printf "\n${BOLD}Re-run this in a new shell if the updater requires the shells to be closed.\n"
|
2020-01-08 15:55:09 +00:00
|
|
|
else
|
2021-07-14 16:10:23 +00:00
|
|
|
error "Re-run this in an MinGW shell.\n"
|
2020-01-08 15:55:09 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
else
|
2021-07-14 16:10:23 +00:00
|
|
|
error "Unable to find C:\msys64 - make sure the shell is installed and then re-run this in a MinGW shell.\n"
|
2020-01-08 15:55:09 +00:00
|
|
|
exit 1
|
|
|
|
fi
|