[PR #55] [MERGED] Fix launcher.sh bash script #105

Closed
opened 2026-10-15 18:07:02 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/SillyTavern/SillyTavern-Launcher/pull/55
Author: @Alib234
Created: 6/8/2024
Status: ✅ Merged
Merged: 6/8/2024
Merged by: @deffcolony

Base: main ← Head: main


📝 Commits (7)

  • 3c4ada9 fix bash script unable to update properly and unable to find terminal
  • 7bbcff2 fix whoopsie
  • 4ee1a97 remove unnecessary ./ from if statements in update()
  • a268f72 make the script cd into the base dir first
  • 22e8abb make first cd more concise
  • b82ab6a remove "$(dirname "$0")" memes by removing it completely, as usage only caused issues or was pointless
  • 35ec50c actually make SillyTavern start

📊 Changes

1 file changed (+39 additions, -27 deletions)

View changed files

📝 launcher.sh (+39 -27)

📄 Description

This changes the launcher.sh bash script and fixes updating and finding a terminal.

The broken updating was caused by the script being in the SillyTavern subdirectory because of cd'ing into it at line 136, as well as incorrect cd parameters in the update function after finding the directory because if we are already in the script's directory $(dirname "$0") outputs ., I also simplified the if statements in the update() function and made it cd out back to the main SillyTavern-Launcher so it can proceed with the next update step.

The seldom working terminal finding which always fell back to xterm was caused by the script looking at the $TERMINAL env var, I added to the find_terminal() function so that it also looks in the much more common $TERM env var first and then in $TERMINAL.

It also fixes random issues that I find that shouldn't happen but happen because of one reason or another.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/SillyTavern/SillyTavern-Launcher/pull/55 **Author:** [@Alib234](https://github.com/Alib234) **Created:** 6/8/2024 **Status:** ✅ Merged **Merged:** 6/8/2024 **Merged by:** [@deffcolony](https://github.com/deffcolony) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (7) - [`3c4ada9`](https://github.com/SillyTavern/SillyTavern-Launcher/commit/3c4ada93b428d9cc8b7e5d8f09117f5d3778336c) fix bash script unable to update properly and unable to find terminal - [`7bbcff2`](https://github.com/SillyTavern/SillyTavern-Launcher/commit/7bbcff28eac391148d8bed80d3637eee8158cd17) fix whoopsie - [`4ee1a97`](https://github.com/SillyTavern/SillyTavern-Launcher/commit/4ee1a973054914233e422f446befe56a578bb716) remove unnecessary ./ from if statements in update() - [`a268f72`](https://github.com/SillyTavern/SillyTavern-Launcher/commit/a268f7233cf1266af4712920b247ba4e1514a937) make the script cd into the base dir first - [`22e8abb`](https://github.com/SillyTavern/SillyTavern-Launcher/commit/22e8abb195eaa40ae1512d06dbc3313a438d5db4) make first cd more concise - [`b82ab6a`](https://github.com/SillyTavern/SillyTavern-Launcher/commit/b82ab6acc2fdadcac6bf0a4376a82e43f6992c11) remove "$(dirname "$0")" memes by removing it completely, as usage only caused issues or was pointless - [`35ec50c`](https://github.com/SillyTavern/SillyTavern-Launcher/commit/35ec50c6ea684e34aca060630ee3f70689aea1f1) actually make SillyTavern start ### 📊 Changes **1 file changed** (+39 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `launcher.sh` (+39 -27) </details> ### 📄 Description This changes the launcher.sh bash script and fixes updating and finding a terminal. The broken updating was caused by the script being in the SillyTavern subdirectory because of cd'ing into it at line 136, as well as incorrect cd parameters in the update function after finding the directory because if we are already in the script's directory `$(dirname "$0")` outputs `.`, I also simplified the if statements in the update() function and made it cd out back to the main SillyTavern-Launcher so it can proceed with the next update step. The seldom working terminal finding which always fell back to xterm was caused by the script looking at the $TERMINAL env var, I added to the find_terminal() function so that it also looks in the much more common $TERM env var first and then in $TERMINAL. It also fixes random issues that I find that shouldn't happen but happen because of one reason or another. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 18:07:02 +00:00
Sign in to join this conversation.
No description provided.