shithub: iso

Download patch

ref: 6c6f09d989e5db7242365e6844c67b618192f996
parent: e4322f4dffdea1ac61d67e2f0852982c65f5e98d
author: moody <moody@remilia>
date: Sun Jul 23 14:46:14 EDT 2023

clean better, garbage collect old isos, and correct issues with log listsings

--- a/bin/buildisos.rc
+++ b/bin/buildisos.rc
@@ -1,4 +1,4 @@
-#!/bin/rc
+#!/bin/rc -e
 rfork en
 
 home=/usr/build
@@ -34,6 +34,8 @@
 
 	# user
 	cd /sys/src
+	mk nuke
+	mk libs
 	mk install
 
 	# kernel
@@ -40,23 +42,35 @@
 	switch($objtype){
 	case amd64
 		cd /sys/src/9/pc64
+		mk clean
 		mk install
+		mk clean
 	case 386
 		cd /sys/src/9/pc
+		mk clean
 		mk install
+		mk clean
 	case arm
 		cd /sys/src/9/bcm
+		mk clean
 		mk 'CONF=pi' install
 		mk 'CONF=pi2' install
+		mk clean
 	case arm64
 		cd /sys/src/9/bcm64
+		mk clean
 		mk 'CONF=pi3' install
 		mk 'CONF=pi4' install
+		mk clean
 		cd /sys/src/9/imx8
+		mk clean
 		mk 'CONF=reform' install
+		mk clean
 	case spim
 		cd /sys/src/9/mt7688/
+		mk clean
 		mk install
+		mk clean
 	}
 
 	# bootloader
@@ -63,14 +77,22 @@
 	switch($objtype){
 	case 386 amd64
 		cd /sys/src/boot/pc
+		mk clean
 		mk install
+		mk clean
 		cd /sys/src/boot/efi
+		mk clean
 		mk install
+		mk clean
 	case arm arm64
 		cd /sys/src/boot/bcm
+		mk clean
 		mk
+		mk clean
 		cd /sys/src/boot/reform
+		mk clean
 		mk
+		mk clean
 	}
 }
 
@@ -95,6 +117,7 @@
 	switch($a){
 	case amd64
 		mkdist $release.amd64.iso
+		mkdist $release.amd64.qcow2
 	case 386
 		mkdist $release.386.iso
 	case arm
--- a/bin/nightlyiso.rc
+++ b/bin/nightlyiso.rc
@@ -21,7 +21,7 @@
 
 buildisos.rc >$log >[2=1]
 date >>$log
-if(~ `{ls $home/www/9front/*gz | grep $rev | wc -l} 5){
+if(~ `{ls $home/www/9front/*gz | grep $rev | wc -l} 6){
 	echo pass >$res
 	echo $rev >$home/www/9front/latest
 }
@@ -30,3 +30,8 @@
 
 echo $head >>$res
 echo $head >prev
+
+#garbage collection
+latest=`{cat $home/www/9front/latest}
+for(i in `{ls $home/www/9front | grep -v $latest | grep '\.(iso|gz|img|qcow2)$'})
+	rm $i
--- a/src/execfs/builds/index.rc
+++ b/src/execfs/builds/index.rc
@@ -12,8 +12,11 @@
 	echo '<a href="/9front/'^$i^'">'^$i^'</a><br>'
 }
 
+echo '<h2>Source</h2>'
+echo '<a href="http://shithub.us/moody/iso/HEAD/info.html">On shithub</a>'
+
 echo '<h2>Logs</h2>'
-for(i in /usr/build/www/9front/*.status){
+for(i in `{ls -t /usr/build/www/9front/*.status}){
 	cat $i | {
 		res=`{read}
 		commit=`{read}