Update NSLPluginInstaller.sh

This commit is contained in:
Roy 2024-10-21 02:26:31 -07:00 committed by GitHub
parent af2d7bad52
commit 9d78ebc396
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,14 +46,8 @@ fi
set +x
if $DECKY_LOADER_EXISTS; then
USER_INPUT=$(zenity --forms --title="Authentication Required" --text="Decky Loader detected! $(if $NSL_PLUGIN_EXISTS; then echo 'NSL Plugin also detected and will be updated to the latest version 🚀.'; else echo 'But no NSL plugin :(. Would you like to inject it and go to Game Mode?
'; fi) Please enter your password to proceed:" --separator="|" --add-password="Password")
else
zenity --error --text="Decky Loader not detected. Please download and install it from their website first and re-run this script to get the NSL Plugin."
rm -rf "$download_dir"
exit 1
fi
while true; do
USER_INPUT=$(zenity --forms --title="Authentication Required" --text="Decky Loader detected! $(if $NSL_PLUGIN_EXISTS; then echo 'NSL Plugin also detected and will be updated to the latest version 🚀.'; else echo 'But no NSL plugin :(. Would you like to inject it and go to Game Mode?'; fi) Please enter your password to proceed:" --separator="|" --add-password="Password")
USER_PASSWORD=$(echo $USER_INPUT | cut -d'|' -f1)
if [ -z "$USER_PASSWORD" ]; then
@ -61,6 +55,19 @@ if [ -z "$USER_PASSWORD" ]; then
exit 1
fi
echo "$USER_PASSWORD" | sudo -S echo "Password accepted" 2>/dev/null
if [ $? -eq 0 ]; then
break
else
zenity --error --text="Incorrect password. Please try again."
fi
done
else
zenity --error --text="Decky Loader not detected. Please download and install it from their website first and re-run this script to get the NSL Plugin."
rm -rf "$download_dir"
exit 1
fi
if $NSL_PLUGIN_EXISTS; then
show_message "NSL Plugin detected. Deleting and updating..."
echo "Plugin directory exists. Removing..."
@ -77,7 +84,6 @@ curl -L "$REPO_URL" -o /tmp/NonSteamLaunchersDecky.zip
echo "$USER_PASSWORD" | sudo -S unzip -o /tmp/NonSteamLaunchersDecky.zip -d /tmp/
echo "$USER_PASSWORD" | sudo -S cp -r /tmp/NonSteamLaunchersDecky-main/* "$LOCAL_DIR"
echo "$USER_PASSWORD" | sudo -S rm -rf /tmp/NonSteamLaunchersDecky*
set -x