mirror of
https://github.com/dwinkler1/np.git
synced 2026-02-19 22:40:57 -05:00
Fix runtime errors and improve robustness in host configs and scripts
- Fix KeyError in julia.nix when Project.toml lacks deps table - Fix incorrect uv args in python.nix (remove --run + --add-flags combination) - Remove redundant 'uv add ipython' from sync branch in python.nix - Fix relative paths in project-scripts.nix (./scripts -> ../scripts) - Fix initProject.sh to check file existence before git add - Add RVER validation in updateDeps.sh with proper error handling - Add tool availability checks in updateDeps.sh (uv, julia, devenv) - Add flake.nix backup before modification in updateDeps.sh - Ensure updateDeps.sh runs from repository root Co-authored-by: dwinkler1 <22460147+dwinkler1@users.noreply.github.com>
This commit is contained in:
parent
40095ac868
commit
2a5a1acd62
5 changed files with 84 additions and 38 deletions
|
|
@ -44,15 +44,24 @@ fi
|
|||
# Initialize git
|
||||
if [[ ! -d ".git" ]]; then
|
||||
git init
|
||||
echo "✓ Initialized Git repository and added: flake.nix, flake.lock"
|
||||
echo "✓ Initialized Git repository"
|
||||
fi
|
||||
# Check if files are already staged/tracked before adding
|
||||
if ! git diff --cached --name-only | grep -q "flake.nix\|flake.lock" &&
|
||||
! git ls-files --error-unmatch flake.nix flake.lock >/dev/null 2>&1; then
|
||||
echo "✓ Adding flake.nix, flake.lock to Git repository"
|
||||
git add flake.nix flake.lock
|
||||
else
|
||||
echo "✓ flake.nix, flake.lock already tracked/staged in Git"
|
||||
|
||||
# Check if files exist and are not already staged/tracked before adding
|
||||
if [[ -f "flake.nix" ]] && ! git diff --cached --name-only 2>/dev/null | grep -q "flake.nix" &&
|
||||
! git ls-files --error-unmatch flake.nix >/dev/null 2>&1; then
|
||||
echo "✓ Adding flake.nix to Git repository"
|
||||
git add flake.nix
|
||||
elif [[ -f "flake.nix" ]]; then
|
||||
echo "✓ flake.nix already tracked/staged in Git"
|
||||
fi
|
||||
|
||||
if [[ -f "flake.lock" ]] && ! git diff --cached --name-only 2>/dev/null | grep -q "flake.lock" &&
|
||||
! git ls-files --error-unmatch flake.lock >/dev/null 2>&1; then
|
||||
echo "✓ Adding flake.lock to Git repository"
|
||||
git add flake.lock
|
||||
elif [[ -f "flake.lock" ]]; then
|
||||
echo "✓ flake.lock already tracked/staged in Git"
|
||||
fi
|
||||
# Create .gitignore
|
||||
if [[ ! -f ".gitignore" ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue