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
|
if [ ! -d "$module_path" ]; then
|
||||||
echo "Adding worktree for $branch in $module_path"
|
echo "Adding worktree for $branch in $module_path"
|
||||||
git worktree add "$module_path" "$branch" 2>/dev/null
|
git worktree add "$module_path" "$branch" 2>/dev/null
|
||||||
# else
|
else
|
||||||
# echo "Worktree for $branch already exists"
|
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
|
fi
|
||||||
done
|
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" ''
|
mod_status = pkgs.writeShellScriptBin "mod_status" ''
|
||||||
cwd=$(pwd)
|
cwd=$(pwd)
|
||||||
|
|
8
hosts/lio/flake.lock
generated
8
hosts/lio/flake.lock
generated
|
@ -1364,11 +1364,11 @@
|
||||||
"rust-overlay": "rust-overlay_3"
|
"rust-overlay": "rust-overlay_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1737571139,
|
"lastModified": 1737610236,
|
||||||
"narHash": "sha256-e5nK+KmfS+bYmKo4g3zC8lsEND0nYoBmn+qocmVM50o=",
|
"narHash": "sha256-UfC+hBu09KEepjnqbXGqRJ0jTlV8HTuD1GjB+ZjTjYM=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "a6a34c6eddafe0d838465232c17e0893e909edd0",
|
"rev": "631d85a771f3e22822b9ac02d895e2a06aa1e183",
|
||||||
"revCount": 259,
|
"revCount": 260,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.joshuabell.xyz/nvim"
|
"url": "https://git.joshuabell.xyz/nvim"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue