mirror of
https://codeberg.org/spire/nix.git
synced 2026-08-02 12:25:00 +02:00
add script to update all sdks
This commit is contained in:
parent
c64d3d1194
commit
7fbb26a81a
3 changed files with 19 additions and 2 deletions
17
update-all.nu
Executable file
17
update-all.nu
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#! /usr/bin/env nu
|
||||
|
||||
def main [] {
|
||||
let sdks = open nix/sourcemod/hl2sdks.json | columns
|
||||
$sdks | each {|sdk| update_sdk $sdk}
|
||||
}
|
||||
|
||||
def update_sdk [sdk: string] {
|
||||
print $"Updating ($sdk) SDK"
|
||||
# some sdks might have identical files at some point, so their hash can be the same
|
||||
# nix-update will replace all occurences of the hash, which might not be correct
|
||||
# so we put a unique dummy value in there to work around this
|
||||
open nix/sourcemod/hl2sdks.json | update ([$sdk, "sha256"] | into cell-path) $"($sdk)-placeholder" | save -f nix/sourcemod/hl2sdks.json
|
||||
|
||||
nix-update --flake --use-update-script $"hl2sdk.($sdk)"
|
||||
nix build .#sourcemods.x86_64-linux.tf2
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue