Skip to content

Commit

Permalink
fixed check update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
moraroy authored Jan 12, 2025
1 parent 1d905ea commit 5822cf0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions NSLPluginInstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,8 @@ if [ -d "${logged_in_home}/homebrew/plugins" ]; then
DECKY_LOADER_EXISTS=true
fi

if [ -d "$LOCAL_DIR" ]; then
if [ -z "$(ls -A $LOCAL_DIR)" ]; then
NSL_PLUGIN_EXISTS=false
else
NSL_PLUGIN_EXISTS=true
fi
if [ -d "$LOCAL_DIR" ] && [ -n "$(ls -A $LOCAL_DIR)" ]; then
NSL_PLUGIN_EXISTS=true
fi

# Set version check variables
Expand Down Expand Up @@ -82,6 +78,12 @@ fetch_local_version() {

# Function to 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
local_version=$(fetch_local_version)
github_version=$(fetch_github_version)
Expand Down

0 comments on commit 5822cf0

Please sign in to comment.