From 5658500666e810a287b383fcb86b13c9966125e2 Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Wed, 8 Jan 2020 10:55:09 -0500 Subject: [PATCH] Add script to update msys shell --- bin/update-msys-shell | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 bin/update-msys-shell diff --git a/bin/update-msys-shell b/bin/update-msys-shell new file mode 100644 index 0000000..433db0b --- /dev/null +++ b/bin/update-msys-shell @@ -0,0 +1,22 @@ +#!/bin/bash + +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 + printf "${BOLD}${YELLOW}Updating MSYS Shell${NORMAL}\n" + printf "${BOLD}Note: when this finishes, restart your shell and re-run this script in order to update applications, or manually run ${YELLOW}pacman -Su${NORMAL}\n" + pacman -Syu + printf "${BOLD}${GREEN}Done!${NORMAL}\n" + else + error "Please re-run this in a MinGW shell.\n" + exit 1 + fi +else + error "Unable to find C:\msys64 - make sure the shell is installed and then re-run this in the MinGW shell.\n" + exit 1 +fi