shithub: ricket

Download patch

ref: bfe5106fdbd47510945a4c8303081f7e5c65e9fe
parent: 80fc4d5b790327bb95b0fb0fccdc785fcbb8de16
author: Skyrbunny <tallesttower1@gmail.com>
date: Fri Sep 8 20:08:33 EDT 2023

ok this May work now

diff: cannot open a/bin/test//null: file does not exist: 'a/bin/test//null' diff: cannot open a/bin//null: file does not exist: 'a/bin//null'
--- a/.gitignore
+++ b/.gitignore
@@ -1,0 +1,1 @@
+bin
--- a/bin/install.rc
+++ /dev/null
@@ -1,5 +1,0 @@
-
-#!/bin/rc
-mv test /amd64/test/bin
-bind -b /amd64/test/bin /bin
-	
\ No newline at end of file
binary files a/bin/test/ricket /dev/null differ
--- a/bin/test/test
+++ /dev/null
@@ -1,3 +1,0 @@
-
-#!/bin/rc
-ricket run test.wasm $*
binary files a/bin/test/test.wasm /dev/null differ
binary files a/ricket b/ricket differ
--- a/ricket.go
+++ b/ricket.go
@@ -6,7 +6,6 @@
 	_ "embed"
 	"fmt"
 	"io"
-	"io/fs"
 	"log"
 	"os"
 	"path"
@@ -90,7 +89,7 @@
 	bin_dir := os.Args[4]
 	program_name := os.Args[3]
 
-	err := os.MkdirAll(bin_dir+"/"+program_name, fs.ModeDir)
+	err := os.MkdirAll(bin_dir+"/"+program_name, 0777)
 	if err != nil {
 		fmt.Printf("Error while making destination directory: %s\n", err)
 		return
@@ -101,7 +100,7 @@
 		dst := fmt.Sprintf("%s/%s/%s", bin_dir, program_name, wasm_filename)
 		dest_file, err := os.Create(dst)
 		if err != nil {
-			fmt.Printf("Error while copying wasm file: %s\n", err)
+			fmt.Printf("Error while creating wasm file directory: %s\n", err)
 			return
 		}
 		wasm_file, err := os.Open(wasm_path)