mirror of
https://github.com/dwinkler1/nvimConfig.git
synced 2026-02-19 22:40:57 -05:00
init wrapper-module config
This commit is contained in:
commit
91755583fd
46 changed files with 4277 additions and 0 deletions
22
scripts/updater.sh
Normal file
22
scripts/updater.sh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
echo "📡 Fetching latest R version from rstats-on-nix..."
|
||||
RVER=$( wget -qO- 'https://raw.githubusercontent.com/ropensci/rix/refs/heads/main/inst/extdata/available_df.csv' | tail -n 1 | head -n 1 | cut -d',' -f4 | tr -d '"' )
|
||||
|
||||
# Validate RVER matches YYYY-MM-DD format
|
||||
if [[ ! "$RVER" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
|
||||
echo "❌ Error: Failed to fetch valid R version date. Got: '$RVER'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✅ R date is $RVER"
|
||||
|
||||
# Create backup of flake.nix before modifying
|
||||
cp flake.nix flake.nix.backup
|
||||
|
||||
# Update rixpkgs date in flake.nix
|
||||
if sed -i "s|rixpkgs.url = \"github:rstats-on-nix/nixpkgs/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\";|rixpkgs.url = \"github:rstats-on-nix/nixpkgs/$RVER\";|" flake.nix; then
|
||||
echo "✅ Updated rixpkgs date in flake.nix"
|
||||
rm flake.nix.backup
|
||||
else
|
||||
echo "⚠️ Warning: Failed to update flake.nix, restoring backup"
|
||||
mv flake.nix.backup flake.nix
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue