mirror of
https://github.com/RGBCube/ncc
synced 2025-07-30 11:37:44 +00:00
Use rsync in build script lol
This commit is contained in:
parent
f85db5253c
commit
68461ffd53
1 changed files with 5 additions and 10 deletions
15
rebuild.nu
15
rebuild.nu
|
@ -18,16 +18,11 @@ def main --wrapped [
|
|||
if $host == (hostname) or $host == "" {
|
||||
sudo sh -c $"nixos-rebuild switch ($flags | str join ' ') |& nom --json"
|
||||
} else {
|
||||
git ls-files | tar -cf - --files-from - | zstd -c3 | save --force /tmp/config.tar.zst
|
||||
scp -q /tmp/config.tar.zst ($host + ':/tmp/')
|
||||
git ls-files | rsync --rsh "ssh -q" --delete --files-from - ./ cube:Configuration
|
||||
|
||||
ssh -q $host $"
|
||||
rm -rf /tmp/config
|
||||
mkdir /tmp/config
|
||||
cd /tmp/config
|
||||
tar -xf /tmp/config.tar.zst
|
||||
|
||||
sh -c 'sudo nixos-rebuild switch ($flags | str join ' ') |& nom --json'
|
||||
"
|
||||
ssh -q $host $"sh -c '
|
||||
cd Configuration
|
||||
sudo nixos-rebuild switch ($flags | str join ' ') |& nom --json
|
||||
'"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue