reinstall in case ProxSpace has been moved

This commit is contained in:
Gator96100 2021-08-09 22:13:04 +02:00
commit 5a265cc30a
3 changed files with 33 additions and 20 deletions

View file

@ -11,7 +11,16 @@ if [ -f /setup/bin/ps-upgrade.new ]; then
mv /setup/bin/ps-upgrade.new /setup/bin/ps-upgrade mv /setup/bin/ps-upgrade.new /setup/bin/ps-upgrade
fi fi
if [ \( ! -f /setup/installed64.txt -a "$MSYSTEM" == "MINGW64" \) ]; then if [ "$MSYSTEM" == "MINGW64" ]; then
if [ -f /setup/installed ]; then
source /setup/installed
if [ "$PSINSTALLPATH" != "$OLDPWD" ]; then
export PSREINSTALL=1
ps-setup
unset PSREINSTALL
fi
else
if [ "$MAYBE_FIRST_START" = "true" ]; then if [ "$MAYBE_FIRST_START" = "true" ]; then
if [ -f "/usr/bin/update-ca-trust" ]; then if [ -f "/usr/bin/update-ca-trust" ]; then
sh /usr/bin/update-ca-trust sh /usr/bin/update-ca-trust
@ -27,4 +36,5 @@ if [ \( ! -f /setup/installed64.txt -a "$MSYSTEM" == "MINGW64" \) ]; then
yes | pacman -Suy yes | pacman -Suy
ps-setup ps-setup
fi fi
fi
fi fi

View file

@ -9,7 +9,8 @@ ps_print "Arch: $MSYSTEM_CARCH"
ps_print "OS: $(wmic OS get Caption,CSDVersion,OSArchitecture,Version | awk 'NR==2')" ps_print "OS: $(wmic OS get Caption,CSDVersion,OSArchitecture,Version | awk 'NR==2')"
ps_print "CPU: $(wmic CPU get Name | awk 'NR==2')" ps_print "CPU: $(wmic CPU get Name | awk 'NR==2')"
ps_print "Ram: $(wmic COMPUTERSYSTEM get TotalPhysicalMemory | awk 'NR==2')" ps_print "Ram: $(wmic COMPUTERSYSTEM get TotalPhysicalMemory | awk 'NR==2')"
ps_print "Installed64: $(cat /setup/installed64.txt)" ps_print "InstallDate: $PSINSTALLDATE"
ps_print "InstallPath: $PSINSTALLPATH"
ps_print "OLDPWD: $OLDPWD" ps_print "OLDPWD: $OLDPWD"
ps_print "Path: $PATH" ps_print "Path: $PATH"
ps_print "arm-none-eabi-gcc: $(arm-none-eabi-gcc -dumpversion)" ps_print "arm-none-eabi-gcc: $(arm-none-eabi-gcc -dumpversion)"

View file

@ -1,7 +1,7 @@
check_install () { check_install () {
echo "Installing: $1" echo "Installing: $1"
pacman -Q $1 > /dev/null pacman -Q $1 &> /dev/null
if [ $? == 1 ]; then if [ $? == 1 ] || [ -n "$PSREINSTALL" ]; then
pacman --noconfirm --overwrite='*' -S $1 pacman --noconfirm --overwrite='*' -S $1
fi fi
} }
@ -19,7 +19,9 @@ setup_proxspace ()
yes | pacman -Sc yes | pacman -Sc
echo $(date '+%Y-%m-%d %H:%M:%S') > /setup/installed64.txt echo "export PSINSTALLDATE=\"$(date '+%Y-%m-%d %H:%M:%S')\"" > /setup/installed
echo "export PSINSTALLPATH=\"$OLDPWD\"" >> /setup/installed
fi fi
} }
setup_proxspace setup_proxspace