mirror of
https://github.com/moraroy/NonSteamLaunchers-On-Steam-Deck.git
synced 2025-01-20 13:51:10 +01:00
fixed check update logic
This commit is contained in:
parent
1d905ea1af
commit
5822cf0705
@ -39,12 +39,8 @@ if [ -d "${logged_in_home}/homebrew/plugins" ]; then
|
|||||||
DECKY_LOADER_EXISTS=true
|
DECKY_LOADER_EXISTS=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$LOCAL_DIR" ]; then
|
if [ -d "$LOCAL_DIR" ] && [ -n "$(ls -A $LOCAL_DIR)" ]; then
|
||||||
if [ -z "$(ls -A $LOCAL_DIR)" ]; then
|
|
||||||
NSL_PLUGIN_EXISTS=false
|
|
||||||
else
|
|
||||||
NSL_PLUGIN_EXISTS=true
|
NSL_PLUGIN_EXISTS=true
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set version check variables
|
# Set version check variables
|
||||||
@ -82,6 +78,12 @@ fetch_local_version() {
|
|||||||
|
|
||||||
# Function to compare versions
|
# Function to compare versions
|
||||||
compare_versions() {
|
compare_versions() {
|
||||||
|
# Only compare versions if both local and GitHub versions are available
|
||||||
|
if [ ! -d "$LOCAL_DIR" ] || [ ! -f "$LOCAL_DIR/package.json" ]; then
|
||||||
|
echo "Local plugin not found or no package.json. Skipping version comparison."
|
||||||
|
return 1 # Skip version comparison and proceed to install/update
|
||||||
|
fi
|
||||||
|
|
||||||
# Fetch local and GitHub versions
|
# Fetch local and GitHub versions
|
||||||
local_version=$(fetch_local_version)
|
local_version=$(fetch_local_version)
|
||||||
github_version=$(fetch_github_version)
|
github_version=$(fetch_github_version)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user