shithub: mycel

Download patch

ref: 616c65b0e59735510eb1fdd0d0813a9ba84d613e
parent: b98c9bf6ec810717faf7a336f0a1222d2918448c
author: Philip Silva <philip.silva@protonmail.com>
date: Wed Jul 14 13:11:03 EDT 2021

nil check for fsys

--- a/js/js.go
+++ b/js/js.go
@@ -46,6 +46,9 @@
 }
 
 func call(fn, cmd string, args... string) (resp string, err error) {
+	if fsys == nil {
+		return "", fmt.Errorf("fsys nil")
+	}
 	fid, err := fsys.Open(fn, plan9.ORDWR)
 	if err != nil {
 		return
--- a/package.rc
+++ b/package.rc
@@ -1,7 +1,7 @@
-name64='opossum-plan9-amd64'
-name32='opossum-plan9-386'
-tarball64=`{pwd} ^ '/packages/' ^ $name64 ^ '-v0.0.1-' ^ `{date -i} ^ '-' ^ `{cat /mnt/git/branch/heads/master/hash | read -c 6} ^ '.tgz'
-tarball32=`{pwd} ^ '/packages/' ^ $name32 ^ '-v0.0.1-' ^ `{date -i} ^ '-' ^ `{cat /mnt/git/branch/heads/master/hash | read -c 6} ^ '.tgz'
+name64='opossum-amd64'
+name32='opossum-386'
+tarball64=`{pwd} ^ '/packages/' ^ $name64 ^ '-' ^ `{date -i} ^ '-' ^ `{cat /mnt/git/branch/heads/master/hash | read -c 6} ^ '.tgz'
+tarball32=`{pwd} ^ '/packages/' ^ $name32 ^ '-' ^ `{date -i} ^ '-' ^ `{cat /mnt/git/branch/heads/master/hash | read -c 6} ^ '.tgz'
 
 fn build {
 	tarball=$1
@@ -15,10 +15,12 @@
 
 	echo Compiling $GOARCH...
 	cd cmd/opossum
-	go build -ldflags '-s -w' -o $name.bin
+	go build -ldflags '-s -w' -o $name
 	cd ../..
-	mv cmd/opossum/$name.bin .
-	mv $name.bin ./$name/
+	cd cmd/gojafs
+	go build -ldflags '-s -w' -o gojafs
+	cd ../..
+	mv cmd/opossum/$name cmd/gojafs/gojafs ./$name/
 	cp README.md ./$name/
 	cp opossum.jpg ./$name/
 	tar czf $tarball $name
@@ -38,5 +40,5 @@
 cd /tmp/`{date -n}
 tar xf $tarball64
 cd $name64
-./$name64.bin '-quiet=false'
-./$name64.bin '-experimentalJsInsecure=true' '-quiet=false'
+./$name64 -v
+./$name64 -v -jsinsecure