upgrade nvim

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-01-22 23:48:05 -06:00
parent 3153fbe49c
commit 16735edf34
2 changed files with 24 additions and 6 deletions

View file

@ -45,10 +45,28 @@
if [ ! -d "$module_path" ]; then
echo "Adding worktree for $branch in $module_path"
git worktree add "$module_path" "$branch" 2>/dev/null
# else
# echo "Worktree for $branch already exists"
else
cd "$module_path"
git fetch origin "$branch" >/dev/null 2>&1
if ! git diff --quiet HEAD "origin/$branch"; then
echo "Updates available for $branch in $module_path"
fi
cd - >/dev/null
fi
done
# Check for and remove orphaned module directories
if [ -d "modules" ]; then
for dir in modules/*; do
if [ -d "$dir" ]; then
module_name="$(basename "$dir")"
if ! echo "$branches" | grep -q "^mod_$module_name$"; then
echo "Removing orphaned module directory: $dir"
git worktree remove --force "$dir"
fi
fi
done
fi
'';
mod_status = pkgs.writeShellScriptBin "mod_status" ''
cwd=$(pwd)