upgrade nvim
This commit is contained in:
parent
3153fbe49c
commit
16735edf34
2 changed files with 24 additions and 6 deletions
22
flake.nix
22
flake.nix
|
@ -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)
|
||||
|
|
8
hosts/lio/flake.lock
generated
8
hosts/lio/flake.lock
generated
|
@ -1364,11 +1364,11 @@
|
|||
"rust-overlay": "rust-overlay_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737571139,
|
||||
"narHash": "sha256-e5nK+KmfS+bYmKo4g3zC8lsEND0nYoBmn+qocmVM50o=",
|
||||
"lastModified": 1737610236,
|
||||
"narHash": "sha256-UfC+hBu09KEepjnqbXGqRJ0jTlV8HTuD1GjB+ZjTjYM=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "a6a34c6eddafe0d838465232c17e0893e909edd0",
|
||||
"revCount": 259,
|
||||
"rev": "631d85a771f3e22822b9ac02d895e2a06aa1e183",
|
||||
"revCount": 260,
|
||||
"type": "git",
|
||||
"url": "https://git.joshuabell.xyz/nvim"
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue