shithub: ninethings

Download patch

ref: ff693efbe18a459d712cb7c8dabf6eb27fab8e27
parent: 75f250b20a29f6be373cd3fa8a3d1f0adc110c2a
author: Aaron Bieber <aaron@bolddaemon.com>
date: Sat Nov 18 01:00:02 EST 2023

sysbuild: use /lib/news/build to hold the version

--- a/rc/sysbuild
+++ b/rc/sysbuild
@@ -1,6 +1,8 @@
 #!/bin/rc -b
 rfork en
 
+build_news=/lib/news/build
+
 if(test -e /mnt/wsys/wctl){
 	echo scroll > /mnt/wsys/wctl
 }
@@ -15,8 +17,8 @@
 cid=`{cat /.git/refs/$branch}
 ver=unknown
 
-if(test -f /sys/version)
-	ver=`{cat /sys/version}
+if(test -f $build_news)
+	ver=`{cat $build_news}
 
 if(! ~ $force 1){
 	if(~ $ver $cid){
@@ -49,5 +51,5 @@
 	cp /amd64/9pc64 /n/9fat/
 }
 
-echo $cid >/sys/version
+echo $cid >$build_news
 echo Updated to $cid