code wiki / _hdl_build / nx_gsplat_ship.nx
nx_gsplat_ship.nx source
↩ module page · 24 lines · 1541 B
1// nx_gsplat_ship.nx -- stage the Gaussian-splat showcase for nx_aw_push: knowledge/gsplat.html -> docroot
2// gsplat/index.html -> https://nishifamily.com/gsplat (additive, never-brick). license_tier: ORIGINAL expect_exit: 0
3import "nx_syscalls.nx"
4
5func sw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
6
7func main() -> i64 {
8 let sfd: i64 = sys_openat_wr("/mnt/c/Users/elder/AppData/Local/Temp/awpush.src\x00" as *u8, 420)
9 if sfd < 0 { sw("nx_gsplat_ship: cannot stage src\n\x00" as *u8); return 1 }
10 let sp: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/knowledge/gsplat.html\n\x00" as *u8
11 var sn: i64 = 0
12 while sp[sn] != (0 as u8) { sn = sn + 1 }
13 sys_write(sfd, sp, sn)
14 sys_close(sfd)
15 let dfd: i64 = sys_openat_wr("/mnt/c/Users/elder/AppData/Local/Temp/awpush.dst\x00" as *u8, 420)
16 if dfd < 0 { sw("nx_gsplat_ship: cannot stage dst\n\x00" as *u8); return 2 }
17 let dp: *u8 = "mkdir -p /volume1/homes/elderwesto/nishihost/sites/nishifamily/gsplat; cat > /volume1/homes/elderwesto/nishihost/sites/nishifamily/gsplat/index.html.tmp; mv -f /volume1/homes/elderwesto/nishihost/sites/nishifamily/gsplat/index.html.tmp /volume1/homes/elderwesto/nishihost/sites/nishifamily/gsplat/index.html\n\x00" as *u8
18 var dn: i64 = 0
19 while dp[dn] != (0 as u8) { dn = dn + 1 }
20 sys_write(dfd, dp, dn)
21 sys_close(dfd)
22 sw("nx_gsplat_ship: staged (gsplat.html -> sites/nishifamily/gsplat/index.html); deploy = run nx_aw_push\n\x00" as *u8)
23 return 0
24}