From 021ef0ec631293e858dedb3f180fc57dd3384b81 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Sun, 27 Sep 2020 00:04:45 +0200 Subject: [PATCH] ps-upgrade now upgrades /msys2/ps folder --- msys2/ps/09-proxspace_setup.post | 7 ++++++- msys2/ps/bin/ps-upgrade | 16 +++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/msys2/ps/09-proxspace_setup.post b/msys2/ps/09-proxspace_setup.post index 2c35d3c09..d8748b93a 100644 --- a/msys2/ps/09-proxspace_setup.post +++ b/msys2/ps/09-proxspace_setup.post @@ -4,6 +4,11 @@ export PS1='\[\033]0;ProxSpace v$PSVERSION - $MSYSTEM:\w\007\033[32m\]pm3 \[\033 export PATH=/gcc-arm-none-eabi/bin:/ps/bin:$PATH alias ls='ls -hF --color=auto' +if [ -f /ps/bin/ps/ps-upgrade.new ]; then + rm /ps/bin/ps/ps-upgrade + mv /ps/bin/ps/ps-upgrade.new /ps/bin/ps/ps-upgrade +fi + if [ \( ! -f /ps/installed64.txt -a "$MSYSTEM" == "MINGW64" \) ]; then if [ "$MAYBE_FIRST_START" = "true" ]; then yes | pacman -Syuu @@ -15,4 +20,4 @@ if [ \( ! -f /ps/installed64.txt -a "$MSYSTEM" == "MINGW64" \) ]; then yes | pacman -Su ps-setup fi -fi +fi \ No newline at end of file diff --git a/msys2/ps/bin/ps-upgrade b/msys2/ps/bin/ps-upgrade index edac6bf1c..a86ca3fc0 100644 --- a/msys2/ps/bin/ps-upgrade +++ b/msys2/ps/bin/ps-upgrade @@ -1,2 +1,16 @@ rm /ps/installed64.txt &> /dev/null -yes | pacman -Syuu \ No newline at end of file +git clone https://github.com/Gator96100/ProxSpace.git /ps-upgrade +mv /ps-upgrade/msys2/ps/bin/ps-upgrade /ps-upgrade/msys2/ps/bin/ps-upgrade.new +if [ "$#" -ne 0 ]; then + git checkout $@ +fi +shopt -s extglob +cd /ps +rm -rf -- !(bin) +cd /ps/bin +rm -rf -- !(ps-upgrade) +cp -R /ps-upgrade/msys2/ps / +rm -rf /ps-upgrade +yes | pacman -Syuu +echo "Please restart ProxSpace" +sleep infinity \ No newline at end of file